Skip to content
Snippets Groups Projects
Verified Commit 12913200 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

macro processor: handle empty files

parent 125adff5
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment