Skip to content

Commit

Permalink
Adding extra test info for llvm-mt.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308252 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Eric Beckmann committed Jul 18, 2017
1 parent 8784fb8 commit 6b82fbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 2 additions & 0 deletions test/tools/llvm-mt/help.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
RUN: not llvm-mt /hello /nonsense

RUN: llvm-mt /? | FileCheck %s -check-prefix=HELP

RUN: llvm-mt /inputresource:foo.res /manifest foo.manifest | FileCheck %s -check-prefix=NOT_SUPPORTED
Expand Down
16 changes: 2 additions & 14 deletions tools/llvm-mt/llvm-mt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,15 @@ LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg) {
exit(1);
}

int main(int argc, const char **argv) {
int main(int argc, const char *argv[]) {
errs() << "very start\n";
for (int i = 0; i < argc; i++ ) {
errs() << argv[i] << "\n";
}

sys::PrintStackTraceOnErrorSignal(argv[0]);
PrettyStackTraceProgram X(argc, argv);

ExitOnErr.setBanner("llvm-mt: ");

SmallVector<const char *, 256> argv_buf;
SpecificBumpPtrAllocator<char> ArgAllocator;
ExitOnErr(errorCodeToError(sys::Process::GetArgumentVector(
argv_buf, makeArrayRef(argv, argc), ArgAllocator)));

llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.

CvtResOptTable T;
unsigned MAI, MAC;
ArrayRef<const char *> ArgsArr = makeArrayRef(argv, argc);
ArrayRef<const char *> ArgsArr = makeArrayRef(argv + 1, argc);
opt::InputArgList InputArgs = T.ParseArgs(ArgsArr, MAI, MAC);

errs() << "after\n";
Expand Down

0 comments on commit 6b82fbd

Please sign in to comment.