summaryrefslogtreecommitdiffstats
path: root/clang/Driver
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-08 22:37:58 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-08 22:37:58 +0000
commit5f7ece0bffcf43103950b08dc7e3939b2c56cff6 (patch)
tree059041ffc4503f5b83790e81034f7acdf68c5883 /clang/Driver
parent5d1647daf98bdbdb77b7184154104053df1ffbc1 (diff)
downloadbcm5719-llvm-5f7ece0bffcf43103950b08dc7e3939b2c56cff6.tar.gz
bcm5719-llvm-5f7ece0bffcf43103950b08dc7e3939b2c56cff6.zip
Don't expand tabs in EscapeText, but rather expand them when writing out
the HTML file. This should reduce the amount of memory pressure on the rewriter for files that have a lot of tabs. llvm-svn: 49406
Diffstat (limited to 'clang/Driver')
-rw-r--r--clang/Driver/HTMLDiagnostics.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/Driver/HTMLDiagnostics.cpp b/clang/Driver/HTMLDiagnostics.cpp
index 870628963aa..6910af74d06 100644
--- a/clang/Driver/HTMLDiagnostics.cpp
+++ b/clang/Driver/HTMLDiagnostics.cpp
@@ -199,8 +199,13 @@ void HTMLDiagnostics::HandlePathDiagnostic(const PathDiagnostic& D) {
// Emit the HTML to disk.
- for (RewriteBuffer::iterator I = Buf->begin(), E = Buf->end(); I!=E; ++I)
- os << *I;
+ for (RewriteBuffer::iterator I = Buf->begin(), E = Buf->end(); I!=E; ++I) {
+ // Expand tabs.
+ if (*I == '\t')
+ os << " ";
+ else
+ os << *I;
+ }
}
void HTMLDiagnostics::HandlePiece(Rewriter& R,
OpenPOWER on IntegriCloud