[llvm-driver] Allow llvm driver binary to be called anything

This commit is contained in:
Alex Brachet 2023-03-03 19:45:03 +00:00
parent 1df8de238b
commit 92d3c3294a
2 changed files with 13 additions and 1 deletions

View 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

View File

@ -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();