Drop support for an old version of ld64 (from darwin 9).
[oota-llvm.git] / lib / MC / ELFObjectWriter.cpp
index d77f03f5281aa8a41b19cd35c0bb808c37c72bda..e4442e10a055118eb3ed7a7728a031c67fb2adde 100644 (file)
@@ -866,7 +866,7 @@ void ELFObjectWriter::RecordRelocation(const MCAssembler &Asm,
         (SymA && !SymA->isUndefined()) ? &SymA->getSection() : nullptr;
     auto *ELFSec = cast_or_null<MCSectionELF>(SecA);
     MCSymbol *SectionSymbol =
-        ELFSec ? Asm.getContext().GetOrCreateSymbol(ELFSec->getSectionName())
+        ELFSec ? Asm.getContext().getOrCreateSectionSymbol(*ELFSec)
                : nullptr;
     ELFRelocationEntry Rec(FixupOffset, SectionSymbol, Type, Addend);
     Relocations[FixupSection].push_back(Rec);