[lld] 1198478 - [lld/mac] remove redundant null check
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 9 18:18:48 PST 2021
Author: Nico Weber
Date: 2021-01-09T21:18:32-05:00
New Revision: 1198478c4208726774d6e31ac9be7fd2a8f0d802
URL: https://github.com/llvm/llvm-project/commit/1198478c4208726774d6e31ac9be7fd2a8f0d802
DIFF: https://github.com/llvm/llvm-project/commit/1198478c4208726774d6e31ac9be7fd2a8f0d802.diff
LOG: [lld/mac] remove redundant null check
This is already checked two lines up. No behavior change.
Added:
Modified:
lld/MachO/Driver.cpp
Removed:
################################################################################
diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index 2e52ef9a07fe..857c9991a8e6 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -750,7 +750,7 @@ bool macho::link(ArrayRef<const char *> argsArr, bool canExitEarly,
if (const opt::Arg *arg =
args.getLastArg(OPT_search_paths_first, OPT_search_dylibs_first))
config->searchDylibsFirst =
- (arg && arg->getOption().getID() == OPT_search_dylibs_first);
+ arg->getOption().getID() == OPT_search_dylibs_first;
config->dylibCompatibilityVersion =
parseDylibVersion(args, OPT_compatibility_version);
More information about the llvm-commits
mailing list