Accept not only lld-link but also LLD-LINK, for example.

Filenames are case-insensitive on Windows, so when we dispatch based
on argv0, we need to handle it case-insensitively.

Fixes https://bugs.llvm.org/show_bug.cgi?id=32637.

llvm-svn: 300087
This commit is contained in:
Rui Ueyama 2017-04-12 18:29:52 +00:00
parent 94baec6ee8
commit 5c5bc7bc0a
2 changed files with 6 additions and 3 deletions

View File

@ -0,0 +1,3 @@
# REQUIRES: system-windows
# RUN: not LLD-LINK 2>&1 | FileCheck %s
CHECK: no input files

View File

@ -43,9 +43,9 @@ LLVM_ATTRIBUTE_NORETURN static void die(const Twine &S) {
static Flavor getFlavor(StringRef S) {
return StringSwitch<Flavor>(S)
.Cases("ld", "ld.lld", "gnu", Gnu)
.Case("link", WinLink)
.Case("darwin", Darwin)
.CasesLower("ld", "ld.lld", "gnu", Gnu)
.CaseLower("link", WinLink)
.CaseLower("darwin", Darwin)
.Default(Invalid);
}