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 | 127f6eef7e5fba58a0cc4c7571d404c8a14478f7 (patch) | |
tree | fca370854c3b7c8b9fe75e79e9603ee5cba6e902 /clang/lib/Lex/Lexer.cpp | |
parent | e67a30c77f4af4badf7354d4228091e0e2d7767b (diff) | |
download | bcm5719-llvm-127f6eef7e5fba58a0cc4c7571d404c8a14478f7.tar.gz bcm5719-llvm-127f6eef7e5fba58a0cc4c7571d404c8a14478f7.zip |
[-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)
llvm-svn: 158571
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
-rw-r--r-- | clang/lib/Lex/Lexer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index 69d21f8ad68..4ebe1579d03 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/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 |