[llvm-driver] Allow llvm driver binary to be called anything
This commit is contained in:
parent
1df8de238b
commit
92d3c3294a
12
llvm/test/tools/llvm-driver/not-called-llvm.test
Normal file
12
llvm/test/tools/llvm-driver/not-called-llvm.test
Normal file
|
@ -0,0 +1,12 @@
|
|||
## Don't make symlinks on Windows.
|
||||
# UNSUPPORTED: system-windows
|
||||
# REQUIRES: llvm-driver
|
||||
|
||||
# RUN: rm -rf %t
|
||||
# RUN: mkdir %t
|
||||
# RUN: ln -s %llvm %t/invalidtool
|
||||
# RUN: %t/invalidtool cxxfilt --help | FileCheck %s
|
||||
|
||||
# CHECK: OVERVIEW: LLVM symbol undecoration tool
|
||||
|
||||
# RUN: not %llvm invalidtool cxxfilt --help
|
|
@ -73,7 +73,7 @@ static int findTool(int Argc, char **Argv, const char *Argv0) {
|
|||
return entry##_main(Argc, Argv, MakeDriverArgs());
|
||||
#include "LLVMDriverTools.def"
|
||||
|
||||
if (Is("llvm"))
|
||||
if (Is("llvm") || Argv0 == Argv[0])
|
||||
return findTool(Argc - 1, Argv + 1, Argv0);
|
||||
|
||||
printHelpMessage();
|
||||
|
|
Loading…
Reference in New Issue
Block a user