llvm.org GIT mirror llvm / fb0b759
[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 Jonas Devlieghere 1 year, 1 month ago
4 changed file(s) with 7 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
33 RUN: not llvm-mt /manifest %p/Inputs/test_manifest.manifest /manifest \
44 RUN: %p/Inputs/conflicting.manifest /out:%t 2>&1 >/dev/null | FileCheck %s
55
6 CHECK: llvm-mt error: conflicting attributes for requestedExecutionLevel
6 CHECK: llvm-mt: error: conflicting attributes for requestedExecutionLevel
22 HELP: OVERVIEW: Manifest Tool
33
44 RUN: not llvm-mt /foo 2>&1 >/dev/null | FileCheck %s -check-prefix=INVALID
5 INVALID: llvm-mt error: invalid option '/foo'
5 INVALID: llvm-mt: error: invalid option '/foo'
66
77 RUN: not llvm-mt /oyt:%t 2>&1 | FileCheck %s -check-prefix=INVALID-BUT-CLOSE
8 INVALID-BUT-CLOSE: llvm-mt error: invalid option '/oyt:{{.*}}help.test.tmp', did you mean '/out:{{.*}}help.test.tmp'?
8 INVALID-BUT-CLOSE: llvm-mt: error: invalid option '/oyt:{{.*}}help.test.tmp', did you mean '/out:{{.*}}help.test.tmp'?
99
33 RUN: not llvm-mt /manifest %p/Inputs/bad.manifest 2>&1 >/dev/null | FileCheck \
44 RUN: %s
55
6 CHECK: llvm-mt error: invalid xml document
6 CHECK: llvm-mt: error: invalid xml document
77
88 RUN: not llvm-mt /manifest %p/Inputs/empty.manifest 2>&1 >/dev/null | \
99 RUN: FileCheck %s -check-prefix=EMPTY
1010
11 EMPTY: llvm-mt error: attempted to merge empty manifest
11 EMPTY: llvm-mt: error: attempted to merge empty manifest
1212
1313 RUN: llvm-mt /inputresource:foo.res \
1414 RUN: /manifest %p/Inputs/test_manifest.manifest \
2323 #include "llvm/Support/PrettyStackTrace.h"
2424 #include "llvm/Support/Process.h"
2525 #include "llvm/Support/Signals.h"
26 #include "llvm/Support/WithColor.h"
2627 #include "llvm/Support/raw_ostream.h"
2728 #include "llvm/WindowsManifest/WindowsManifestMerger.h"
2829
6465 } // namespace
6566
6667 LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg) {
67 errs() << "llvm-mt error: " << Msg << "\n";
68 WithColor::error(errs(), "llvm-mt") << Msg << '\n';
6869 exit(1);
6970 }
7071