summaryrefslogtreecommitdiff
path: root/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
commitfaa90eaedd9b4fdf2ad5351efcd553d6b820693a (patch)
treeac4008d4f7af856faf3bf51d3a7fb5e0be71d6ef /lib/Frontend/PrintPreprocessedOutput.cpp
parent2364b4457f2b5b2dd54b0e15e8dcb5e62d211e37 (diff)
downloadclang-faa90eaedd9b4fdf2ad5351efcd553d6b820693a.tar.gz
clang-faa90eaedd9b4fdf2ad5351efcd553d6b820693a.tar.bz2
clang-faa90eaedd9b4fdf2ad5351efcd553d6b820693a.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index 834e5262c6..f3393bfe51 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/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()) {