aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Pragma.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-02-22 13:49:00 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-02-22 13:49:00 +0000
commitb2eb53d9fd973a1a02e05e67a3307b3efd12eff2 (patch)
treef739b1262129ef9487501a10293d43928e82bd73 /lib/Lex/Pragma.cpp
parentcf603e1b1e2353d88171d04e9580b9688854b953 (diff)
Make TokenLexer capable of storing preprocessor directive tokens
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126220 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Pragma.cpp')
-rw-r--r--lib/Lex/Pragma.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp
index f0475bc0cb..31e777604e 100644
--- a/lib/Lex/Pragma.cpp
+++ b/lib/Lex/Pragma.cpp
@@ -110,7 +110,8 @@ void Preprocessor::HandlePragmaDirective(unsigned Introducer) {
PragmaHandlers->HandlePragma(*this, PragmaIntroducerKind(Introducer), Tok);
// If the pragma handler didn't read the rest of the line, consume it now.
- if (CurPPLexer && CurPPLexer->ParsingPreprocessorDirective)
+ if ((CurTokenLexer && CurTokenLexer->isParsingPreprocessorDirective())
+ || (CurPPLexer && CurPPLexer->ParsingPreprocessorDirective))
DiscardUntilEndOfDirective();
}