Exit the command line into <built-in> instead of going directly from the command line to the input file.
We passed <built-in> on the way in, so we should pass it again on the way out.
llvm-svn: 90250
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 972c21f..cf6c561 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -523,6 +523,11 @@
AddImplicitInclude(PredefineBuffer, Path);
}
+ // Exit the command line and go back to <built-in> (2 is LC_LEAVE).
+ LineDirective = "# 1 \"<built-in>\" 2\n";
+ PredefineBuffer.insert(PredefineBuffer.end(),
+ LineDirective, LineDirective+strlen(LineDirective));
+
// Null terminate PredefinedBuffer and add it.
PredefineBuffer.push_back(0);
PP.setPredefines(&PredefineBuffer[0]);