Verified Commit 12913200 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

macro processor: handle empty files

parent 125adff5
Pipeline #2009 passed with stage
in 1 minute and 35 seconds
......@@ -50,6 +50,11 @@ Driver::parse(const string &file_arg, const string &basename_arg, istream &modfi
istream is(command_line_defines_with_endl.rdbuf());
m.parse("command_line_defines", "command_line_defines", is, output, debug, vector<pair<string, string>>{}, paths);
}
// Handle empty files
if (modfile.rdbuf()->in_avail() == 0)
return;
stringstream file_with_endl;
file_with_endl << modfile.rdbuf() << endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment