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
This commit is contained in:
Rafael Espindola 2009-12-01 18:28:16 +00:00
parent a6227fd896
commit f8a04a1d6e
1 changed files with 5 additions and 0 deletions

View File

@ -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]);