]> granicus.if.org Git - clang/commitdiff
Frontend/-H: Add comment on why I used a temporary string here.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 8 Sep 2010 18:19:55 +0000 (18:19 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 8 Sep 2010 18:19:55 +0000 (18:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113379 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/PrintPreprocessedOutput.cpp

index cfaf8a23b1180c921c0b62e4c2b6fe90a55596b6..5ae02f97bd4b5a56034b0d193c4abbe9a47df1f2 100644 (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)