From 0259d20ba1a188acb8770f4b5fab9fc947080be1 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 1 Dec 2009 18:28:16 +0000 Subject: [PATCH] Exit the command line into instead of going directly from the command line to the input file. We passed 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 --- lib/Frontend/InitPreprocessor.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 (2 is LC_LEAVE). + LineDirective = "# 1 \"\" 2\n"; + PredefineBuffer.insert(PredefineBuffer.end(), + LineDirective, LineDirective+strlen(LineDirective)); + // Null terminate PredefinedBuffer and add it. PredefineBuffer.push_back(0); PP.setPredefines(&PredefineBuffer[0]); -- 2.40.0