diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-06-15 23:33:51 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-06-15 23:33:51 +0000 |
commit | 0cdd1fe3ec29b5cbff9a728966ace5c5b5d614f7 (patch) | |
tree | 491d04bd2b9e24f7aa9c54aa522bcd10daebc7dd /lib/Lex/Lexer.cpp | |
parent | 63734d2349783662bf4b7fc24eed4cb31383b00d (diff) |
[-E] Emit a rewritten _Pragma on its own line.
1. Teach Lexer that pragma lexers are like macro expansions at EOF.
2. Treat pragmas like #define/#undef when printing.
3. If we just printed a directive, add a newline before any more tokens.
(4. Miscellaneous cleanup in PrintPreprocessedOutput.cpp)
PR10594 and <rdar://problem/11562490> (two separate related problems)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index 69d21f8ad6..4ebe1579d0 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -2402,7 +2402,7 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { BufferPtr = CurPtr; // Finally, let the preprocessor handle this. - return PP->HandleEndOfFile(Result); + return PP->HandleEndOfFile(Result, isPragmaLexer()); } /// isNextPPTokenLParen - Return 1 if the next unexpanded token lexed from |