diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-08 22:37:58 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-08 22:37:58 +0000 |
commit | fa5be3617294f0e3c341f0ecb6b2076478b1b5ac (patch) | |
tree | d92ec56017bf04856dfe0a36e615396fffe93937 /Driver/HTMLDiagnostics.cpp | |
parent | 5dd18b7d5645ddd9bb182c7cf8afc832f5f3a635 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/HTMLDiagnostics.cpp')
-rw-r--r-- | Driver/HTMLDiagnostics.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Driver/HTMLDiagnostics.cpp b/Driver/HTMLDiagnostics.cpp index 870628963a..6910af74d0 100644 --- a/Driver/HTMLDiagnostics.cpp +++ b/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, |