From 18daca08957b58aefd8734f92b3c22eefea7193c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 23 Mar 2009 15:57:19 +0000 Subject: [PATCH] Now that errs() is properly non-buffered, there's no need to explicitly flush it. llvm-svn: 67526 --- lib/CodeGen/MachineFunction.cpp | 2 +- lib/CodeGen/PseudoSourceValue.cpp | 2 +- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 -- lib/Support/PrettyStackTrace.cpp | 1 - lib/Target/CppBackend/CPPBackend.cpp | 1 - lib/Transforms/Utils/LowerSwitch.cpp | 3 +-- lib/VMCore/AsmWriter.cpp | 5 ++--- 7 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index e19cf7a6ed2..bd7105fd285 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -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()); } diff --git a/lib/CodeGen/PseudoSourceValue.cpp b/lib/CodeGen/PseudoSourceValue.cpp index d0ea7069d4b..b4c20e6bfd3 100644 --- a/lib/CodeGen/PseudoSourceValue.cpp +++ b/lib/CodeGen/PseudoSourceValue.cpp @@ -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 { diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index b85a04d8588..448d7608681 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -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 { diff --git a/lib/Support/PrettyStackTrace.cpp b/lib/Support/PrettyStackTrace.cpp index 77ae5844ce8..c111c5e6be2 100644 --- a/lib/Support/PrettyStackTrace.cpp +++ b/lib/Support/PrettyStackTrace.cpp @@ -68,7 +68,6 @@ static void CrashHandler(void *Cookie) { if (!TmpStr.empty()) { __crashreporter_info__ = strdup(TmpStr.c_str()); errs() << __crashreporter_info__; - errs().flush(); } #endif diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 38134d9189b..9f9c1c41360 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -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"; diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index a7b1efc794f..1da59360fc2 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -147,8 +147,7 @@ BasicBlock* LowerSwitch::switchConvert(CaseItr Begin, CaseItr End, CaseRange& Pivot = *(Begin + Mid); DEBUG(errs() << "Pivot ==> " << cast(Pivot.Low)->getValue() << " -" - << cast(Pivot.High)->getValue() << "\n"; - errs().flush()); + << cast(Pivot.High)->getValue() << "\n"); BasicBlock* LBranch = switchConvert(LHS.begin(), LHS.end(), Val, OrigBlock, Default); diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index b12d4f85d3f..1d52d639577 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -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); }