aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2009-12-01 18:28:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2009-12-01 18:28:16 +0000
commit0259d20ba1a188acb8770f4b5fab9fc947080be1 (patch)
treecd10f1a319ef0c22981bb183408939d9219550b4 /lib/Frontend/InitPreprocessor.cpp
parent0e93d259ad19a0f70d3536d4f0f49710af52a169 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90250 91177308-0d34-0410-b5e6-96231b3b80d8
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]);