Now that errs() is properly non-buffered, there's no need to
authorDan Gohman <gohman@apple.com>
Mon, 23 Mar 2009 15:57:19 +0000 (15:57 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 23 Mar 2009 15:57:19 +0000 (15:57 +0000)
explicitly flush it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67526 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineFunction.cpp
lib/CodeGen/PseudoSourceValue.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Support/PrettyStackTrace.cpp
lib/Target/CppBackend/CPPBackend.cpp
lib/Transforms/Utils/LowerSwitch.cpp
lib/VMCore/AsmWriter.cpp

index e19cf7a6ed23bc46236c14ef35ee4c3dc15c305c..bd7105fd28591c7ddd76a33eef1fc19f191c33ef 100644 (file)
@@ -558,4 +558,4 @@ void MachineConstantPool::print(raw_ostream &OS) const {
   }
 }
 
-void MachineConstantPool::dump() const { print(errs()); errs().flush(); }
+void MachineConstantPool::dump() const { print(errs()); }
index d0ea7069d4bbbe64d003a7b6d2e2553e6a23f738..b4c20e6bfd311c377b6567c5cfe46fece91479f1 100644 (file)
@@ -42,7 +42,7 @@ PseudoSourceValue::PseudoSourceValue() :
   Value(PointerType::getUnqual(Type::Int8Ty), PseudoSourceValueVal) {}
 
 void PseudoSourceValue::dump() const {
-  print(errs()); errs() << '\n'; errs().flush();
+  print(errs()); errs() << '\n';
 }
 
 void PseudoSourceValue::print(raw_ostream &OS) const {
index b85a04d8588c185429a4c8b731b16257a514cf51..448d7608681169b58b63654999809589f41e4601 100644 (file)
@@ -5308,7 +5308,6 @@ std::string ISD::ArgFlagsTy::getArgFlagsString() {
 void SDNode::dump() const { dump(0); }
 void SDNode::dump(const SelectionDAG *G) const {
   print(errs(), G);
-  errs().flush();
 }
 
 void SDNode::print_types(raw_ostream &OS, const SelectionDAG *G) const {
@@ -5544,7 +5543,6 @@ static void DumpNodesr(raw_ostream &OS, const SDNode *N, unsigned indent,
 void SDNode::dumpr() const {
   VisitedSDNodeSet once;
   DumpNodesr(errs(), this, 0, 0, once);
-  errs().flush();
 }
 
 const Type *ConstantPoolSDNode::getType() const {
index 77ae5844ce88ac014a1c573cace6f1a6a4111142..c111c5e6be24e0ec1c8b104bbc3f5cc46e0ec532 100644 (file)
@@ -68,7 +68,6 @@ static void CrashHandler(void *Cookie) {
   if (!TmpStr.empty()) {
     __crashreporter_info__ = strdup(TmpStr.c_str());
     errs() << __crashreporter_info__;
-    errs().flush();
   }
   
 #endif
index 38134d9189b70080c82da92d066af2f0e48f1844..9f9c1c41360591c0f56615b8abed5336efd42fd4 100644 (file)
@@ -1802,7 +1802,6 @@ namespace {
     Out << "int main(int argc, char**argv) {\n";
     Out << "  Module* Mod = " << fname << "();\n";
     Out << "  verifyModule(*Mod, PrintMessageAction);\n";
-    Out << "  errs().flush();\n";
     Out << "  outs().flush();\n";
     Out << "  PassManager PM;\n";
     Out << "  PM.add(createPrintModulePass(&outs()));\n";
index a7b1efc794f5fdbd216a06647a43fb7491dc828d..1da59360fc2beee10b06f6d6dfb8c1193f463f06 100644 (file)
@@ -147,8 +147,7 @@ BasicBlock* LowerSwitch::switchConvert(CaseItr Begin, CaseItr End,
   CaseRange& Pivot = *(Begin + Mid);
   DEBUG(errs() << "Pivot ==> " 
                << cast<ConstantInt>(Pivot.Low)->getValue() << " -"
-               << cast<ConstantInt>(Pivot.High)->getValue() << "\n";
-        errs().flush());
+               << cast<ConstantInt>(Pivot.High)->getValue() << "\n");
 
   BasicBlock* LBranch = switchConvert(LHS.begin(), LHS.end(), Val,
                                       OrigBlock, Default);
index b12d4f85d3f60a62b6ccaa4d24218e929882516f..1d52d63957777542cf5c8ac1ad375180f0109640 100644 (file)
@@ -1813,18 +1813,17 @@ void Value::print(std::ostream &O, AssemblyAnnotationWriter *AAW) const {
 }
 
 // Value::dump - allow easy printing of Values from the debugger.
-void Value::dump() const { print(errs()); errs() << '\n'; errs().flush(); }
+void Value::dump() const { print(errs()); errs() << '\n'; }
 
 // Type::dump - allow easy printing of Types from the debugger.
 // This one uses type names from the given context module
 void Type::dump(const Module *Context) const {
   WriteTypeSymbolic(errs(), this, Context);
   errs() << '\n';
-  errs().flush();
 }
 
 // Type::dump - allow easy printing of Types from the debugger.
 void Type::dump() const { dump(0); }
 
 // Module::dump() - Allow printing of Modules from the debugger.
-void Module::dump() const { print(errs(), 0); errs().flush(); }
+void Module::dump() const { print(errs(), 0); }