summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-12 03:31:33 +0000
committerChris Lattner <sabre@nondot.org>2008-10-12 03:31:33 +0000
commit924efdf6232358a9bb5ce2736f2345cbce5600ee (patch)
treebfb20763989b48ec3503780db4b0f434d4655944 /clang/lib/Lex/PPDirectives.cpp
parent097a8b8777b0c31b91acaaa40f91a1bd917e09c8 (diff)
downloadbcm5719-llvm-924efdf6232358a9bb5ce2736f2345cbce5600ee.tar.gz
bcm5719-llvm-924efdf6232358a9bb5ce2736f2345cbce5600ee.zip
Stop the preprocessor from poking the lexer's private parts.
llvm-svn: 57399
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index a3aaabd298d..44558e19f97 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -150,7 +150,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc,
// directive mode. Tell the lexer this so any newlines we see will be
// converted into an EOM token (this terminates the macro).
CurLexer->ParsingPreprocessorDirective = true;
- CurLexer->KeepCommentMode = false;
+ CurLexer->SetCommentRetentionState(false);
// Read the next token, the directive flavor.
@@ -161,7 +161,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc,
if (Tok.isNot(tok::identifier)) {
CurLexer->ParsingPreprocessorDirective = false;
// Restore comment saving mode.
- CurLexer->KeepCommentMode = KeepComments;
+ CurLexer->SetCommentRetentionState(KeepComments);
continue;
}
@@ -176,7 +176,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc,
FirstChar != 'i' && FirstChar != 'e') {
CurLexer->ParsingPreprocessorDirective = false;
// Restore comment saving mode.
- CurLexer->KeepCommentMode = KeepComments;
+ CurLexer->SetCommentRetentionState(KeepComments);
continue;
}
@@ -197,7 +197,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc,
if (IdLen >= 20) {
CurLexer->ParsingPreprocessorDirective = false;
// Restore comment saving mode.
- CurLexer->KeepCommentMode = KeepComments;
+ CurLexer->SetCommentRetentionState(KeepComments);
continue;
}
memcpy(Directive, &DirectiveStr[0], IdLen);
@@ -278,7 +278,7 @@ void Preprocessor::SkipExcludedConditionalBlock(SourceLocation IfTokenLoc,
CurLexer->ParsingPreprocessorDirective = false;
// Restore comment saving mode.
- CurLexer->KeepCommentMode = KeepComments;
+ CurLexer->SetCommentRetentionState(KeepComments);
}
// Finally, if we are out of the conditional (saw an #endif or ran off the end
@@ -828,7 +828,7 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok) {
// If we are supposed to keep comments in #defines, reenable comment saving
// mode.
- CurLexer->KeepCommentMode = KeepMacroComments;
+ CurLexer->SetCommentRetentionState(KeepMacroComments);
// Create the new macro.
MacroInfo *MI = new MacroInfo(MacroNameTok.getLocation());
OpenPOWER on IntegriCloud