aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-09-08 18:19:55 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-09-08 18:19:55 +0000
commit4566d1a0e5750dc21bd9120be3e1a98d60db5620 (patch)
treeea66ee6dc21530ece800c841c0220a2696c13afb /lib/Frontend/PrintPreprocessedOutput.cpp
parent01b7c3028da5bbcb9f8e52ba67e4613070de0e60 (diff)
Frontend/-H: Add comment on why I used a temporary string here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113379 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index cfaf8a23b1..5ae02f97bd 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -263,6 +263,7 @@ void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc,
// predefines buffer.
if (DumpHeaderIncludes && HasProcessedPredefines &&
Reason == PPCallbacks::EnterFile) {
+ // Write to a temporary string to avoid unnecessary flushing on errs().
llvm::SmallString<256> Msg;
llvm::raw_svector_ostream OS(Msg);
for (unsigned i = 0; i != CurrentIncludeDepth; ++i)