[cfe-commits] r85162 - /cfe/trunk/tools/CIndex/CIndex.cpp

Ted Kremenek kremenek at apple.com
Mon Oct 26 15:08:39 PDT 2009


Author: kremenek
Date: Mon Oct 26 17:08:39 2009
New Revision: 85162

URL: http://llvm.org/viewvc/llvm-project?rev=85162&view=rev
Log:
Remove unnecessary calls to 'flush()'.

Modified:
    cfe/trunk/tools/CIndex/CIndex.cpp

Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=85162&r1=85161&r2=85162&view=diff

==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Mon Oct 26 17:08:39 2009
@@ -380,10 +380,8 @@
                            CXXIdx->getOnlyLocalDecls(),
                            /* UseBumpAllocator = */ true);
   
-  if (!ErrMsg.empty()) {
-    (llvm::errs() << "clang_createTranslationUnit: " << ErrMsg 
-                  << '\n').flush();
-  }
+  if (!ErrMsg.empty())
+    llvm::errs() << "clang_createTranslationUnit: " << ErrMsg  << '\n';
   
   return TU;
 }
@@ -448,10 +446,11 @@
     llvm::errs() << "clang_createTranslationUnitFromSourceFile: " << ErrMsg 
       << '\n' << "Arguments: \n";
     for (std::vector<const char*>::iterator I = argv.begin(), E = argv.end();
-         I!=E; ++I)
-      if (*I) llvm::errs() << ' ' << *I << '\n';
-     
-    (llvm::errs() << '\n').flush();
+         I!=E; ++I) {
+      if (*I)
+        llvm::errs() << ' ' << *I << '\n';
+    }
+    llvm::errs() << '\n';
   }
 #else
   // FIXME: I don't know what is the equivalent '/dev/null' redirect for





More information about the cfe-commits mailing list