[lld] c381772 - [lld] s/dyn_cast/isa
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 06:23:03 PDT 2020
Author: Pavel Labath
Date: 2020-08-11T15:22:44+02:00
New Revision: c3817728e7b6b367a8aa91f8cbbcbc229b10a998
URL: https://github.com/llvm/llvm-project/commit/c3817728e7b6b367a8aa91f8cbbcbc229b10a998
DIFF: https://github.com/llvm/llvm-project/commit/c3817728e7b6b367a8aa91f8cbbcbc229b10a998.diff
LOG: [lld] s/dyn_cast/isa
Fixes some unused variable warnings with gcc.
Added:
Modified:
lld/MachO/Arch/X86_64.cpp
Removed:
################################################################################
diff --git a/lld/MachO/Arch/X86_64.cpp b/lld/MachO/Arch/X86_64.cpp
index c43ed5a17c9a..d168f10475c1 100644
--- a/lld/MachO/Arch/X86_64.cpp
+++ b/lld/MachO/Arch/X86_64.cpp
@@ -248,7 +248,7 @@ void X86_64::prepareSymbolRelocation(lld::macho::Symbol &sym,
case X86_64_RELOC_SIGNED_4:
break;
case X86_64_RELOC_TLV:
- if (auto *dysym = dyn_cast<DylibSymbol>(&sym))
+ if (isa<DylibSymbol>(&sym))
error("relocations to thread-local dylib symbols not yet implemented");
else
assert(isa<Defined>(&sym));
@@ -278,7 +278,7 @@ uint64_t X86_64::resolveSymbolVA(uint8_t *buf, const lld::macho::Symbol &sym,
case X86_64_RELOC_SIGNED_4:
return sym.getVA();
case X86_64_RELOC_TLV: {
- if (auto *dysym = dyn_cast<DylibSymbol>(&sym))
+ if (isa<DylibSymbol>(&sym))
error("relocations to thread-local dylib symbols not yet implemented");
// Convert the movq to a leaq.
More information about the llvm-commits
mailing list