[llvm-readobj] Use stderr and not stdout for error messages.
authorDavide Italiano <davide@freebsd.org>
Wed, 23 Dec 2015 19:29:34 +0000 (19:29 +0000)
committerDavide Italiano <davide@freebsd.org>
Wed, 23 Dec 2015 19:29:34 +0000 (19:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256347 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-readobj/llvm-readobj.cpp

index 92ee299..fa8fee2 100644 (file)
@@ -232,8 +232,8 @@ namespace opts {
 namespace llvm {
 
 LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg) {
-  outs() << "\nError reading file: " << Msg << ".\n";
-  outs().flush();
+  errs() << "\nError reading file: " << Msg << ".\n";
+  errs().flush();
   exit(1);
 }