[llvm] r346622 - [llvm-undname] Use WithColor for error reporting

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 11 14:11:47 PST 2018


Author: jdevlieghere
Date: Sun Nov 11 14:11:47 2018
New Revision: 346622

URL: http://llvm.org/viewvc/llvm-project?rev=346622&view=rev
Log:
[llvm-undname] Use WithColor for error reporting

Use helpers from Support/WithError.h to print errors.

Modified:
    llvm/trunk/tools/llvm-undname/llvm-undname.cpp

Modified: llvm/trunk/tools/llvm-undname/llvm-undname.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-undname/llvm-undname.cpp?rev=346622&r1=346621&r2=346622&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-undname/llvm-undname.cpp (original)
+++ llvm/trunk/tools/llvm-undname/llvm-undname.cpp Sun Nov 11 14:11:47 2018
@@ -18,6 +18,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/InitLLVM.h"
 #include "llvm/Support/Process.h"
+#include "llvm/Support/WithColor.h"
 #include "llvm/Support/raw_ostream.h"
 #include <cstdio>
 #include <cstring>
@@ -44,7 +45,7 @@ static void demangle(const std::string &
     outs() << ResultBuf << "\n";
     outs().flush();
   } else {
-    errs() << "Error: Invalid mangled name\n";
+    WithColor::error() << "Invalid mangled name\n";
   }
   std::free(ResultBuf);
 }




More information about the llvm-commits mailing list