mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-01 21:04:04 -04:00
[llvm-mt] Use WithColor for printing errors.
Use the WithColor helper from support to print errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335416 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4,4 +4,4 @@ UNSUPPORTED: system-windows
|
|||||||
RUN: not llvm-mt /manifest %p/Inputs/test_manifest.manifest /manifest \
|
RUN: not llvm-mt /manifest %p/Inputs/test_manifest.manifest /manifest \
|
||||||
RUN: %p/Inputs/conflicting.manifest /out:%t 2>&1 >/dev/null | FileCheck %s
|
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
|
HELP: OVERVIEW: Manifest Tool
|
||||||
|
|
||||||
RUN: not llvm-mt /foo 2>&1 >/dev/null | FileCheck %s -check-prefix=INVALID
|
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
|
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: not llvm-mt /manifest %p/Inputs/bad.manifest 2>&1 >/dev/null | FileCheck \
|
||||||
RUN: %s
|
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: not llvm-mt /manifest %p/Inputs/empty.manifest 2>&1 >/dev/null | \
|
||||||
RUN: FileCheck %s -check-prefix=EMPTY
|
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: llvm-mt /inputresource:foo.res \
|
||||||
RUN: /manifest %p/Inputs/test_manifest.manifest \
|
RUN: /manifest %p/Inputs/test_manifest.manifest \
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include "llvm/Support/PrettyStackTrace.h"
|
#include "llvm/Support/PrettyStackTrace.h"
|
||||||
#include "llvm/Support/Process.h"
|
#include "llvm/Support/Process.h"
|
||||||
#include "llvm/Support/Signals.h"
|
#include "llvm/Support/Signals.h"
|
||||||
|
#include "llvm/Support/WithColor.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/WindowsManifest/WindowsManifestMerger.h"
|
#include "llvm/WindowsManifest/WindowsManifestMerger.h"
|
||||||
|
|
||||||
@@ -65,7 +66,7 @@ public:
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg) {
|
LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg) {
|
||||||
errs() << "llvm-mt error: " << Msg << "\n";
|
WithColor::error(errs(), "llvm-mt") << Msg << '\n';
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user