[cfe-commits] r69666 - /cfe/trunk/lib/Frontend/InitPreprocessor.cpp
Chris Lattner
sabre at nondot.org
Mon Apr 20 23:00:25 PDT 2009
Author: lattner
Date: Tue Apr 21 01:00:24 2009
New Revision: 69666
URL: http://llvm.org/viewvc/llvm-project?rev=69666&view=rev
Log:
fix massive testsuite failures from Alexei's patch due to inverted logic.
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=69666&r1=69665&r2=69666&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Tue Apr 21 01:00:24 2009
@@ -430,11 +430,10 @@
// Process #define's and #undef's in the order they are given.
for (PreprocessorInitOptions::macro_iterator I = InitOpts.macro_begin(),
E = InitOpts.macro_end(); I != E; ++I) {
- bool isUndef = I->second;
- if (isUndef)
- DefineBuiltinMacro(PredefineBuffer, I->first.c_str());
- else
+ if (I->second) // isUndef
DefineBuiltinMacro(PredefineBuffer, I->first.c_str(), "#undef ");
+ else
+ DefineBuiltinMacro(PredefineBuffer, I->first.c_str());
}
// If -imacros are specified, include them now. These are processed before
@@ -446,13 +445,12 @@
// Process -include directives.
for (PreprocessorInitOptions::include_iterator I = InitOpts.include_begin(),
E = InitOpts.include_end(); I != E; ++I) {
- bool isPTH = I->second;
- if (isPTH) {
- AddImplicitInclude(PredefineBuffer, I->first);
- } else {
+ if (I->second) // isPTH
AddImplicitIncludePTH(PredefineBuffer, PP, I->first);
+ else
+ AddImplicitInclude(PredefineBuffer, I->first);
}
- }
+ }
LineDirective = "# 2 \"<built-in>\" 2\n";
PredefineBuffer.insert(PredefineBuffer.end(),
More information about the cfe-commits
mailing list