aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-21 06:00:24 +0000
committerChris Lattner <sabre@nondot.org>2009-04-21 06:00:24 +0000
commit62f86c4555e14456acef6b251fcb13a66c3ce6dd (patch)
tree501d8093ef79e02803aa2aceb2058d52d059d530
parente116ccf140b813ecd20e3fb4041d7d0b8a967c0b (diff)
fix massive testsuite failures from Alexei's patch due to inverted logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69666 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Frontend/InitPreprocessor.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/Frontend/InitPreprocessor.cpp b/lib/Frontend/InitPreprocessor.cpp
index eb2d64c46d..c0ca1ecd19 100644
--- a/lib/Frontend/InitPreprocessor.cpp
+++ b/lib/Frontend/InitPreprocessor.cpp
@@ -430,11 +430,10 @@ bool InitializePreprocessor(Preprocessor &PP,
// 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 @@ bool InitializePreprocessor(Preprocessor &PP,
// 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(),