aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--lib/Frontend/InitPreprocessor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index 972c21f88d..cf6c561361 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -523,6 +523,11 @@ void clang::InitializePreprocessor(Preprocessor &PP,
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]);