Revert "[NFC] Minor cleanup to use default setting of getLastArg()"

The patch was wrong.  We use "const Arg *A" at the end of
GetLinkerPath, so can't remove it.

This reverts commit 6802fdf887.
This commit is contained in:
Maxim Kuvyrkov 2021-03-18 08:05:14 +00:00
parent 1ce70c15ed
commit 62948c4532
1 changed files with 2 additions and 2 deletions

View File

@ -571,8 +571,8 @@ std::string ToolChain::GetLinkerPath(bool *LinkerIsLLD,
// Get -fuse-ld= first to prevent -Wunused-command-line-argument. -fuse-ld= is
// considered as the linker flavor, e.g. "bfd", "gold", or "lld".
StringRef UseLinker = Args.getLastArgValue(options::OPT_fuse_ld_EQ,
CLANG_DEFAULT_LINKER);
const Arg* A = Args.getLastArg(options::OPT_fuse_ld_EQ);
StringRef UseLinker = A ? A->getValue() : CLANG_DEFAULT_LINKER;
// --ld-path= takes precedence over -fuse-ld= and specifies the executable
// name. -B, COMPILER_PATH and PATH and consulted if the value does not