[lld-macho] Try to unbreak build
authorJez Ng <jezng@fb.com>
Wed, 5 May 2021 19:46:42 +0000 (15:46 -0400)
committerJez Ng <jezng@fb.com>
Wed, 5 May 2021 19:47:14 +0000 (15:47 -0400)
Looks like the PointerUnion casting cares about const-ness...

lld/MachO/Arch/ARM.cpp

index f2d606f..42c7b89 100644 (file)
@@ -107,7 +107,7 @@ void ARM::relocateOne(uint8_t *loc, const Reloc &r, uint64_t value,
   case ARM_RELOC_BR24: {
     uint32_t base = read32le(loc);
     bool isBlx = Bitfield::get<Cond>(base) == 0xf;
-    const Symbol *sym = r.referent.get<const Symbol *>();
+    const Symbol *sym = r.referent.get<Symbol *>();
     int32_t offset = value - (pc + 8);
 
     if (auto *defined = dyn_cast<Defined>(sym)) {