From 4566d1a0e5750dc21bd9120be3e1a98d60db5620 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 8 Sep 2010 18:19:55 +0000 Subject: [PATCH] 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 --- lib/Frontend/PrintPreprocessedOutput.cpp | 1 + 1 file changed, 1 insertion(+) 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) -- 2.40.0