Convert more tools code from cerr and cout to errs() and outs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-07-16 15:30:09 +00:00
parent ad60f660c6
commit ac95cc79ac
21 changed files with 278 additions and 285 deletions

View File

@@ -25,7 +25,6 @@
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Streams.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Signals.h"
#include <memory>
@@ -66,11 +65,11 @@ int main(int argc, char **argv) {
}
if (M.get() == 0) {
cerr << argv[0] << ": ";
errs() << argv[0] << ": ";
if (ErrorMessage.size())
cerr << ErrorMessage << "\n";
errs() << ErrorMessage << "\n";
else
cerr << "bitcode didn't read correctly.\n";
errs() << "bitcode didn't read correctly.\n";
return 1;
}
@@ -130,9 +129,9 @@ int main(int argc, char **argv) {
delete Out;
return 0;
} catch (const std::string& msg) {
cerr << argv[0] << ": " << msg << "\n";
errs() << argv[0] << ": " << msg << "\n";
} catch (...) {
cerr << argv[0] << ": Unexpected unknown exception occurred.\n";
errs() << argv[0] << ": Unexpected unknown exception occurred.\n";
}
return 1;