diff options
| author | Rui Ueyama <ruiu@google.com> | 2017-09-13 20:30:59 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2017-09-13 20:30:59 +0000 |
| commit | a835babef9ae4d522cef2218db0131136e310a7f (patch) | |
| tree | 5fe09660745b079057d4ced4ff614d553236fe11 | |
| parent | 36f2c4df1204d6947a67c304d7c63e378b397594 (diff) | |
| download | bcm5719-llvm-a835babef9ae4d522cef2218db0131136e310a7f.tar.gz bcm5719-llvm-a835babef9ae4d522cef2218db0131136e310a7f.zip | |
Do not use hasArgNoClaim().
Arg instances can be claimed. After claimed, its `isClaimed` function
returns true. We do not use that notion in lld, so using NoClaim
versions of functions is just confusing. This patch is to just use
hasArg instead of hasArgNoClaim.
llvm-svn: 313187
| -rw-r--r-- | lld/COFF/Driver.cpp | 6 | ||||
| -rw-r--r-- | lld/MinGW/Driver.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index c3dfdb2a399..ab3612ca96b 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -744,8 +744,8 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { } } - if (!Args.hasArgNoClaim(OPT_INPUT)) { - if (Args.hasArgNoClaim(OPT_deffile)) + if (!Args.hasArg(OPT_INPUT)) { + if (Args.hasArg(OPT_deffile)) Config->NoEntry = true; else fatal("no input files"); @@ -1067,7 +1067,7 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { } // Handle generation of import library from a def file. - if (!Args.hasArgNoClaim(OPT_INPUT)) { + if (!Args.hasArg(OPT_INPUT)) { fixupExports(); createImportLibrary(/*AsLib=*/true); exit(0); diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp index e69db7ca4e3..9fadae52c24 100644 --- a/lld/MinGW/Driver.cpp +++ b/lld/MinGW/Driver.cpp @@ -76,7 +76,7 @@ opt::InputArgList MinGWOptTable::parse(ArrayRef<const char *> Argv) { error(StringRef(Args.getArgString(MissingIndex)) + ": missing argument"); for (auto *Arg : Args.filtered(OPT_UNKNOWN)) error("unknown argument: " + Arg->getSpelling()); - if (!Args.hasArgNoClaim(OPT_INPUT) && !Args.hasArgNoClaim(OPT_l)) + if (!Args.hasArg(OPT_INPUT) && !Args.hasArg(OPT_l)) error("no input files"); return Args; } |

