[cfe-commits] r90250 - /cfe/trunk/lib/Frontend/InitPreprocessor.cpp

Rafael Espindola rafael.espindola at gmail.com
Tue Dec 1 10:28:17 PST 2009


Author: rafael
Date: Tue Dec  1 12:28:16 2009
New Revision: 90250

URL: http://llvm.org/viewvc/llvm-project?rev=90250&view=rev
Log:
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.


Modified:
    cfe/trunk/lib/Frontend/InitPreprocessor.cpp

Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=90250&r1=90249&r2=90250&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Tue Dec  1 12:28:16 2009
@@ -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]);





More information about the cfe-commits mailing list