summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2013-12-07 08:41:15 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2013-12-07 08:41:15 +0000
commit87f9fef5a5eea460a27a5428110a52709079d165 (patch)
tree28b081dfc763d7060c8460ec67b90cf3281b3b6b /clang/lib
parent49d9f488a9f1daedce3a15f97260b8903ba7ad9c (diff)
downloadbcm5719-llvm-87f9fef5a5eea460a27a5428110a52709079d165.tar.gz
bcm5719-llvm-87f9fef5a5eea460a27a5428110a52709079d165.zip
Changed ConditionValue argument to PPCallbacks If and Elif callbacks to be a 3-state enum.
llvm-svn: 196648
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Lex/PPConditionalDirectiveRecord.cpp4
-rw-r--r--clang/lib/Lex/PPDirectives.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Lex/PPConditionalDirectiveRecord.cpp b/clang/lib/Lex/PPConditionalDirectiveRecord.cpp
index 16dc1d8f091..99b87a0a152 100644
--- a/clang/lib/Lex/PPConditionalDirectiveRecord.cpp
+++ b/clang/lib/Lex/PPConditionalDirectiveRecord.cpp
@@ -77,7 +77,7 @@ void PPConditionalDirectiveRecord::addCondDirectiveLoc(
void PPConditionalDirectiveRecord::If(SourceLocation Loc,
SourceRange ConditionRange,
- bool ConditionValue) {
+ ConditionValueKind ConditionValue) {
addCondDirectiveLoc(CondDirectiveLoc(Loc, CondDirectiveStack.back()));
CondDirectiveStack.push_back(Loc);
}
@@ -98,7 +98,7 @@ void PPConditionalDirectiveRecord::Ifndef(SourceLocation Loc,
void PPConditionalDirectiveRecord::Elif(SourceLocation Loc,
SourceRange ConditionRange,
- bool ConditionValue,
+ ConditionValueKind ConditionValue,
SourceLocation IfLoc) {
addCondDirectiveLoc(CondDirectiveLoc(Loc, CondDirectiveStack.back()));
CondDirectiveStack.back() = Loc;
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 70c32c3dc69..2aa67fb8626 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -424,7 +424,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc,
const SourceLocation CondEnd = CurPPLexer->getSourceLocation();
Callbacks->Elif(Tok.getLocation(),
SourceRange(CondBegin, CondEnd),
- CondValue, CondInfo.IfLoc);
+ (CondValue ? PPCallbacks::CVK_True : PPCallbacks::CVK_False), CondInfo.IfLoc);
}
// If this condition is true, enter it!
if (CondValue) {
@@ -2280,7 +2280,7 @@ void Preprocessor::HandleIfDirective(Token &IfToken,
if (Callbacks)
Callbacks->If(IfToken.getLocation(),
SourceRange(ConditionalBegin, ConditionalEnd),
- ConditionalTrue);
+ (ConditionalTrue ? PPCallbacks::CVK_True : PPCallbacks::CVK_False));
// Should we include the stuff contained by this directive?
if (ConditionalTrue) {
@@ -2377,7 +2377,7 @@ void Preprocessor::HandleElifDirective(Token &ElifToken) {
if (Callbacks)
Callbacks->Elif(ElifToken.getLocation(),
SourceRange(ConditionalBegin, ConditionalEnd),
- true, CI.IfLoc);
+ PPCallbacks::CVK_NotEvaluated, CI.IfLoc);
// Finally, skip the rest of the contents of this block.
SkipExcludedConditionalBlock(CI.IfLoc, /*Foundnonskip*/true,
OpenPOWER on IntegriCloud