From b0658549c5b92249ce844e8fd8c7c2cf2fce24a3 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Mon, 4 Jul 2011 12:52:03 +0100 Subject: [PATCH] Fix crash when no input filename was provided. --- module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.cpp b/module.cpp index 1c66cb52..b5927ab8 100644 --- a/module.cpp +++ b/module.cpp @@ -154,7 +154,7 @@ Module::CompileFile() { if (runPreprocessor) { std::string 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()); yyparse(); yy_delete_buffer(strbuf);