Fix crash when no input filename was provided.
This commit is contained in:
@@ -154,7 +154,7 @@ Module::CompileFile() {
|
|||||||
if (runPreprocessor) {
|
if (runPreprocessor) {
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
llvm::raw_string_ostream os(buffer);
|
llvm::raw_string_ostream os(buffer);
|
||||||
execPreprocessor(filename, &os);
|
execPreprocessor((filename != NULL) ? filename : "-", &os);
|
||||||
YY_BUFFER_STATE strbuf = yy_scan_string(os.str().c_str());
|
YY_BUFFER_STATE strbuf = yy_scan_string(os.str().c_str());
|
||||||
yyparse();
|
yyparse();
|
||||||
yy_delete_buffer(strbuf);
|
yy_delete_buffer(strbuf);
|
||||||
|
|||||||
Reference in New Issue
Block a user