diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-09 20:45:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-09 20:45:43 +0000 |
commit | 5c0887c1be978f4288cba5afcf93d0bdf2bd22f5 (patch) | |
tree | a3b28178708d7f1447a1a5d7efa0033cb3bf9d03 | |
parent | c3d8d57b010e2ed15a2a7685d5761db14f5d2252 (diff) |
Fix a pretty big but subtle bug counting the number of newlines to emit.
This would cause us to emit different code (in -E mode) for these two files:
---
#define t(x) x
t(a
3)
---
#define t(x) x
t(a
3)
---
In one case, -E would print "a\n3", in the other it printed "a3". Now
it prints "a3" for both.
This is part of PR1848.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44742 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Driver/PrintPreprocessedOutput.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Driver/PrintPreprocessedOutput.cpp b/Driver/PrintPreprocessedOutput.cpp index da0023760d..9783754654 100644 --- a/Driver/PrintPreprocessedOutput.cpp +++ b/Driver/PrintPreprocessedOutput.cpp @@ -188,8 +188,8 @@ void PrintPPOutputPPCallbacks::MoveToLine(SourceLocation Loc) { else { const char *NewLines = "\n\n\n\n\n\n\n\n"; OutputString(NewLines, LineNo-CurLine); - CurLine = LineNo; } + CurLine = LineNo; } else { if (EmittedTokensOnThisLine) { OutputChar('\n'); |