summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-01-30 21:50:18 +0000
committerBen Langmuir <blangmuir@apple.com>2014-01-30 21:50:18 +0000
commit5eb7cb74a73d9181b5ddbc50451947db98e7f7b7 (patch)
treee445999d6003a86180f8f9e7855fbb88f5dde81b /clang/lib/Frontend/PrintPreprocessedOutput.cpp
parentfe5ab2f5ba8e0d6202e6d679e9bcc97643df2435 (diff)
downloadbcm5719-llvm-5eb7cb74a73d9181b5ddbc50451947db98e7f7b7.tar.gz
bcm5719-llvm-5eb7cb74a73d9181b5ddbc50451947db98e7f7b7.zip
Revert "Fix assertion failures on annot_* tokens in clang -E"
This is causing a failure in the msan buildbot that I am having trouble reproducing. Reverting until I can figure out what went wrong. llvm-svn: 200492
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--clang/lib/Frontend/PrintPreprocessedOutput.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
index 834e5262c63..f3393bfe51c 100644
--- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -342,7 +342,6 @@ void PrintPPOutputPPCallbacks::InclusionDirective(SourceLocation HashLoc,
OS << "@import " << Imported->getFullModuleName() << ";"
<< " /* clang -E: implicit import for \"" << File->getName() << "\" */";
EmittedTokensOnThisLine = true;
- setEmittedDirectiveOnThisLine();
}
}
@@ -658,9 +657,11 @@ static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok,
// -traditional-cpp the lexer keeps /all/ whitespace, including comments.
SourceLocation StartLoc = Tok.getLocation();
Callbacks->MoveToLine(StartLoc.getLocWithOffset(Tok.getLength()));
- } else if (Tok.isAnnotation()) {
- // PrintPPOutputPPCallbacks handles producing appropriate output here.
- // Ignore this token entirely.
+ } else if (Tok.is(tok::annot_module_include) ||
+ Tok.is(tok::annot_module_begin) ||
+ Tok.is(tok::annot_module_end)) {
+ // PrintPPOutputPPCallbacks::InclusionDirective handles producing
+ // appropriate output here. Ignore this token entirely.
PP.Lex(Tok);
continue;
} else if (IdentifierInfo *II = Tok.getIdentifierInfo()) {
OpenPOWER on IntegriCloud