[cfe-commits] r40419 - /cfe/trunk/Driver/PrintPreprocessedOutput.cpp
Chris Lattner
sabre at nondot.org
Sun Jul 22 22:14:05 PDT 2007
Author: lattner
Date: Mon Jul 23 00:14:05 2007
New Revision: 40419
URL: http://llvm.org/viewvc/llvm-project?rev=40419&view=rev
Log:
A minor tweak to -E output, speeding up -E 1.5% on 447.dealII
Modified:
cfe/trunk/Driver/PrintPreprocessedOutput.cpp
Modified: cfe/trunk/Driver/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/PrintPreprocessedOutput.cpp?rev=40419&r1=40418&r2=40419&view=diff
==============================================================================
--- cfe/trunk/Driver/PrintPreprocessedOutput.cpp (original)
+++ cfe/trunk/Driver/PrintPreprocessedOutput.cpp Mon Jul 23 00:14:05 2007
@@ -151,10 +151,13 @@
// If this line is "close enough" to the original line, just print newlines,
// otherwise print a #line directive.
if (LineNo-CurLine < 8) {
- unsigned Line = CurLine;
- for (; Line != LineNo; ++Line)
+ if (LineNo-CurLine == 1)
OutputChar('\n');
- CurLine = Line;
+ else {
+ const char *NewLines = "\n\n\n\n\n\n\n\n";
+ OutputString(NewLines, LineNo-CurLine);
+ CurLine = LineNo;
+ }
} else {
if (EmittedTokensOnThisLine) {
OutputChar('\n');
More information about the cfe-commits
mailing list