Frontend/-H: Add comment on why I used a temporary string here.

llvm-svn: 113379
This commit is contained in:
Daniel Dunbar
2010-09-08 18:19:55 +00:00
parent 99a9f4661a
commit 04ebde017f

View File

@@ -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)