diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-15 16:35:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-15 16:35:29 +0000 |
commit | 65f57c233cd4499e2e8b52a503201e64edfd6a9e (patch) | |
tree | af96a9f73e7b0060483af26b6f3e1a6210677b67 /tools/bugpoint/ExecutionDriver.cpp | |
parent | 6ca5f9360ce657c1ab382605536751d33c1d138a (diff) |
Use errs() instead of std::cerr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r-- | tools/bugpoint/ExecutionDriver.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp index 854aeb817f..6e5b7a0514 100644 --- a/tools/bugpoint/ExecutionDriver.cpp +++ b/tools/bugpoint/ExecutionDriver.cpp @@ -186,7 +186,7 @@ bool BugDriver::initializeExecutionEnvironment() { break; } if (!Interpreter) - std::cerr << Message; + errs() << Message; else // Display informational messages on stdout instead of stderr std::cout << Message; @@ -278,13 +278,13 @@ void BugDriver::compileProgram(Module *M) { sys::Path BitcodeFile ("bugpoint-test-program.bc"); std::string ErrMsg; if (BitcodeFile.makeUnique(true,&ErrMsg)) { - std::cerr << ToolName << ": Error making unique filename: " << ErrMsg - << "\n"; + errs() << ToolName << ": Error making unique filename: " << ErrMsg + << "\n"; exit(1); } if (writeProgramToFile(BitcodeFile.toString(), M)) { - std::cerr << ToolName << ": Error emitting bitcode to file '" - << BitcodeFile << "'!\n"; + errs() << ToolName << ": Error emitting bitcode to file '" + << BitcodeFile << "'!\n"; exit(1); } @@ -313,15 +313,15 @@ std::string BugDriver::executeProgram(std::string OutputFile, // Emit the program to a bitcode file... sys::Path uniqueFilename("bugpoint-test-program.bc"); if (uniqueFilename.makeUnique(true, &ErrMsg)) { - std::cerr << ToolName << ": Error making unique filename: " - << ErrMsg << "!\n"; + errs() << ToolName << ": Error making unique filename: " + << ErrMsg << "!\n"; exit(1); } BitcodeFile = uniqueFilename.toString(); if (writeProgramToFile(BitcodeFile, Program)) { - std::cerr << ToolName << ": Error emitting bitcode to file '" - << BitcodeFile << "'!\n"; + errs() << ToolName << ": Error emitting bitcode to file '" + << BitcodeFile << "'!\n"; exit(1); } CreatedBitcode = true; @@ -336,8 +336,8 @@ std::string BugDriver::executeProgram(std::string OutputFile, // Check to see if this is a valid output filename... sys::Path uniqueFile(OutputFile); if (uniqueFile.makeUnique(true, &ErrMsg)) { - std::cerr << ToolName << ": Error making unique filename: " - << ErrMsg << "\n"; + errs() << ToolName << ": Error making unique filename: " + << ErrMsg << "\n"; exit(1); } OutputFile = uniqueFile.toString(); @@ -352,7 +352,7 @@ std::string BugDriver::executeProgram(std::string OutputFile, Timeout, MemoryLimit); if (RetVal == -1) { - std::cerr << "<timeout>"; + errs() << "<timeout>"; static bool FirstTimeout = true; if (FirstTimeout) { std::cout << "\n" @@ -420,12 +420,12 @@ bool BugDriver::createReferenceFile(Module *M, const std::string &Filename) { ReferenceOutputFile = executeProgramSafely(Filename); std::cout << "\nReference output is: " << ReferenceOutputFile << "\n\n"; } catch (ToolExecutionError &TEE) { - std::cerr << TEE.what(); + errs() << TEE.what(); if (Interpreter != SafeInterpreter) { - std::cerr << "*** There is a bug running the \"safe\" backend. Either" - << " debug it (for example with the -run-cbe bugpoint option," - << " if CBE is being used as the \"safe\" backend), or fix the" - << " error some other way.\n"; + errs() << "*** There is a bug running the \"safe\" backend. Either" + << " debug it (for example with the -run-cbe bugpoint option," + << " if CBE is being used as the \"safe\" backend), or fix the" + << " error some other way.\n"; } return false; } @@ -452,7 +452,7 @@ bool BugDriver::diffProgram(const std::string &BitcodeFile, sys::Path(Output.toString()), AbsTolerance, RelTolerance, &Error)) { if (Diff == 2) { - std::cerr << "While diffing output: " << Error << '\n'; + errs() << "While diffing output: " << Error << '\n'; exit(1); } FilesDifferent = true; |