diff --git a/lld/MachO/SymbolTable.cpp b/lld/MachO/SymbolTable.cpp index 6a3ee9230f413..ecf8f94239e16 100644 --- a/lld/MachO/SymbolTable.cpp +++ b/lld/MachO/SymbolTable.cpp @@ -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(s)) + if (isa(s)) error("found defined symbol with illegal name " + DSOHandle::name); } replaceSymbol(s, header);