[lld] 837d16f - [NFC] Simplify /noimplib argument logic

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 07:41:41 PDT 2022


Author: Tobias Hieta
Date: 2022-04-13T16:40:30+02:00
New Revision: 837d16fb4c1cb00c5d0c72a0dff543f0bd5ff770

URL: https://github.com/llvm/llvm-project/commit/837d16fb4c1cb00c5d0c72a0dff543f0bd5ff770
DIFF: https://github.com/llvm/llvm-project/commit/837d16fb4c1cb00c5d0c72a0dff543f0bd5ff770.diff

LOG: [NFC] Simplify /noimplib argument logic

Added: 
    

Modified: 
    lld/COFF/Driver.cpp

Removed: 
    


################################################################################
diff  --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 4ae75de4586a8..d1c68d1ba125f 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -1673,8 +1673,7 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
   if (auto *arg = args.getLastArg(OPT_implib))
     config->implib = arg->getValue();
 
-  if (auto *arg = args.getLastArg(OPT_noimplib))
-    config->noimplib = true;
+  config->noimplib = args.hasArg(OPT_noimplib);
 
   // Handle /opt.
   bool doGC = debug == DebugKind::None || args.hasArg(OPT_profile);


        


More information about the llvm-commits mailing list