mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[llvm-mt] Use WithColor for printing errors.
Use the WithColor helper from support to print errors. llvm-svn: 335416
This commit is contained in:
parent
c8fc3bc1e9
commit
d68f8db2e1
@ -4,4 +4,4 @@ UNSUPPORTED: system-windows
|
||||
RUN: not llvm-mt /manifest %p/Inputs/test_manifest.manifest /manifest \
|
||||
RUN: %p/Inputs/conflicting.manifest /out:%t 2>&1 >/dev/null | FileCheck %s
|
||||
|
||||
CHECK: llvm-mt error: conflicting attributes for requestedExecutionLevel
|
||||
CHECK: llvm-mt: error: conflicting attributes for requestedExecutionLevel
|
||||
|
@ -3,8 +3,8 @@ RUN: llvm-mt /h | FileCheck %s -check-prefix=HELP
|
||||
HELP: OVERVIEW: Manifest Tool
|
||||
|
||||
RUN: not llvm-mt /foo 2>&1 >/dev/null | FileCheck %s -check-prefix=INVALID
|
||||
INVALID: llvm-mt error: invalid option '/foo'
|
||||
INVALID: llvm-mt: error: invalid option '/foo'
|
||||
|
||||
RUN: not llvm-mt /oyt:%t 2>&1 | FileCheck %s -check-prefix=INVALID-BUT-CLOSE
|
||||
INVALID-BUT-CLOSE: llvm-mt error: invalid option '/oyt:{{.*}}help.test.tmp', did you mean '/out:{{.*}}help.test.tmp'?
|
||||
INVALID-BUT-CLOSE: llvm-mt: error: invalid option '/oyt:{{.*}}help.test.tmp', did you mean '/out:{{.*}}help.test.tmp'?
|
||||
|
||||
|
@ -4,12 +4,12 @@ UNSUPPORTED: system-windows
|
||||
RUN: not llvm-mt /manifest %p/Inputs/bad.manifest 2>&1 >/dev/null | FileCheck \
|
||||
RUN: %s
|
||||
|
||||
CHECK: llvm-mt error: invalid xml document
|
||||
CHECK: llvm-mt: error: invalid xml document
|
||||
|
||||
RUN: not llvm-mt /manifest %p/Inputs/empty.manifest 2>&1 >/dev/null | \
|
||||
RUN: FileCheck %s -check-prefix=EMPTY
|
||||
|
||||
EMPTY: llvm-mt error: attempted to merge empty manifest
|
||||
EMPTY: llvm-mt: error: attempted to merge empty manifest
|
||||
|
||||
RUN: llvm-mt /inputresource:foo.res \
|
||||
RUN: /manifest %p/Inputs/test_manifest.manifest \
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "llvm/Support/PrettyStackTrace.h"
|
||||
#include "llvm/Support/Process.h"
|
||||
#include "llvm/Support/Signals.h"
|
||||
#include "llvm/Support/WithColor.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/WindowsManifest/WindowsManifestMerger.h"
|
||||
|
||||
@ -65,7 +66,7 @@ public:
|
||||
} // namespace
|
||||
|
||||
LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg) {
|
||||
errs() << "llvm-mt error: " << Msg << "\n";
|
||||
WithColor::error(errs(), "llvm-mt") << Msg << '\n';
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user