Use getUnaliasedOption so that this switch works for option aliases.

There are no alises handled by this switch, but getUnaliasesdOption is
preferred way of doing this. This is also consistent with ELF and COFF.

llvm-svn: 313180
This commit is contained in:
Rui Ueyama 2017-09-13 19:44:36 +00:00
parent 8ae4e79a08
commit 9c37d8c18b
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ bool mingw::link(ArrayRef<const char *> ArgsArr, raw_ostream &Diag) {
StringRef Prefix = "";
bool Static = false;
for (auto *A : Args) {
switch (A->getOption().getID()) {
switch (A->getOption().getUnaliasedOption().getID()) {
case OPT_INPUT:
if (StringRef(A->getValue()).endswith(".def"))
Add("-def:" + StringRef(A->getValue()));