[Mach0] Fix unused-variable warnings
authorGabriel Hjort Ã…kerlund <gabriel.hjort.akerlund@ericsson.com>
Thu, 19 Nov 2020 09:47:47 +0000 (10:47 +0100)
committerDavid Stenberg <david.stenberg@ericsson.com>
Thu, 19 Nov 2020 09:51:15 +0000 (10:51 +0100)
Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D91519

lld/MachO/SymbolTable.cpp

index 6a3ee92..ecf8f94 100644 (file)
@@ -134,7 +134,7 @@ Symbol *SymbolTable::addDSOHandle(const MachHeaderSection *header) {
     // FIXME: Make every symbol (including absolute symbols) contain a
     // reference to their originating file, then add that file name to this
     // error message.
-    if (auto *defined = dyn_cast<Defined>(s))
+    if (isa<Defined>(s))
       error("found defined symbol with illegal name " + DSOHandle::name);
   }
   replaceSymbol<DSOHandle>(s, header);