[llvm] r238506 - Remove a trivial forwarding function. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Thu May 28 14:36:02 PDT 2015
Author: rafael
Date: Thu May 28 16:36:02 2015
New Revision: 238506
URL: http://llvm.org/viewvc/llvm-project?rev=238506&view=rev
Log:
Remove a trivial forwarding function. NFC.
Modified:
llvm/trunk/include/llvm/MC/MCAssembler.h
llvm/trunk/lib/MC/ELFObjectWriter.cpp
llvm/trunk/lib/MC/MCAssembler.cpp
llvm/trunk/lib/MC/MCELFStreamer.cpp
llvm/trunk/lib/MC/MCExpr.cpp
llvm/trunk/lib/MC/MCMachOStreamer.cpp
llvm/trunk/lib/MC/MCObjectStreamer.cpp
llvm/trunk/lib/MC/MCObjectWriter.cpp
llvm/trunk/lib/MC/MachObjectWriter.cpp
llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp
llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp
Modified: llvm/trunk/include/llvm/MC/MCAssembler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAssembler.h?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAssembler.h (original)
+++ llvm/trunk/include/llvm/MC/MCAssembler.h Thu May 28 16:36:02 2015
@@ -884,15 +884,6 @@ public:
bool hasSymbolData(const MCSymbol &Symbol) const { return Symbol.hasData(); }
- MCSymbolData &getSymbolData(const MCSymbol &Symbol) {
- return const_cast<MCSymbolData &>(
- static_cast<const MCAssembler &>(*this).getSymbolData(Symbol));
- }
-
- const MCSymbolData &getSymbolData(const MCSymbol &Symbol) const {
- return Symbol.getData();
- }
-
MCSymbolData &getOrCreateSymbolData(const MCSymbol &Symbol,
bool *Created = nullptr) {
if (Created)
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Thu May 28 16:36:02 2015
@@ -387,7 +387,7 @@ void ELFObjectWriter::ExecutePostLayoutB
if (!Ref)
continue;
const MCSymbol &Symbol = Ref->getSymbol();
- MCSymbolData &SD = Asm.getSymbolData(Symbol);
+ MCSymbolData &SD = Symbol.getData();
StringRef AliasName = Alias.getName();
size_t Pos = AliasName.find('@');
@@ -465,7 +465,7 @@ void ELFObjectWriter::writeSymbol(Symbol
uint8_t Type = MCELF::GetType(OrigData);
MCSymbolData *BaseSD = nullptr;
if (Base) {
- BaseSD = &Layout.getAssembler().getSymbolData(*Base);
+ BaseSD = &Base->getData();
Type = mergeTypeForSet(Type, MCELF::GetType(*BaseSD));
}
uint8_t Info = (Binding << ELF_STB_Shift) | (Type << ELF_STT_Shift);
@@ -829,7 +829,7 @@ void ELFObjectWriter::computeSymbolTable
bool Local = isLocal(Symbol, Used);
if (!Local && MCELF::GetBinding(SD) == ELF::STB_LOCAL) {
assert(BaseSymbol);
- MCSymbolData &BaseData = Asm.getSymbolData(*BaseSymbol);
+ MCSymbolData &BaseData = BaseSymbol->getData();
MCELF::SetBinding(SD, ELF::STB_GLOBAL);
MCELF::SetBinding(BaseData, ELF::STB_GLOBAL);
}
Modified: llvm/trunk/lib/MC/MCAssembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAssembler.cpp (original)
+++ llvm/trunk/lib/MC/MCAssembler.cpp Thu May 28 16:36:02 2015
@@ -195,7 +195,7 @@ const MCSymbol *MCAsmLayout::getBaseSymb
const MCSymbol &ASym = A->getSymbol();
const MCAssembler &Asm = getAssembler();
- const MCSymbolData &ASD = Asm.getSymbolData(ASym);
+ const MCSymbolData &ASD = ASym.getData();
if (ASD.isCommon()) {
// FIXME: we should probably add a SMLoc to MCExpr.
Asm.getContext().reportFatalError(SMLoc(),
Modified: llvm/trunk/lib/MC/MCELFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCELFStreamer.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCELFStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCELFStreamer.cpp Thu May 28 16:36:02 2015
@@ -113,7 +113,7 @@ void MCELFStreamer::EmitLabel(MCSymbol *
const MCSectionELF &Section =
static_cast<const MCSectionELF&>(Symbol->getSection());
- MCSymbolData &SD = getAssembler().getSymbolData(*Symbol);
+ MCSymbolData &SD = Symbol->getData();
if (Section.getFlags() & ELF::SHF_TLS)
MCELF::SetType(SD, ELF::STT_TLS);
}
Modified: llvm/trunk/lib/MC/MCExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCExpr.cpp (original)
+++ llvm/trunk/lib/MC/MCExpr.cpp Thu May 28 16:36:02 2015
@@ -471,8 +471,8 @@ static void AttemptToFoldSymbolOffsetDif
if (!Asm->getWriter().IsSymbolRefDifferenceFullyResolved(*Asm, A, B, InSet))
return;
- const MCSymbolData &AD = Asm->getSymbolData(SA);
- const MCSymbolData &BD = Asm->getSymbolData(SB);
+ const MCSymbolData &AD = SA.getData();
+ const MCSymbolData &BD = SB.getData();
if (AD.getFragment() == BD.getFragment()) {
Addend += (AD.getOffset() - BD.getOffset());
Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Thu May 28 16:36:02 2015
@@ -194,7 +194,7 @@ void MCMachOStreamer::EmitLabel(MCSymbol
MCObjectStreamer::EmitLabel(Symbol);
- MCSymbolData &SD = getAssembler().getSymbolData(*Symbol);
+ MCSymbolData &SD = Symbol->getData();
// This causes the reference type flag to be cleared. Darwin 'as' was "trying"
// to clear the weak reference and weak definition bits too, but the
// implementation was buggy. For now we just try to match 'as', for
Modified: llvm/trunk/lib/MC/MCObjectStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectStreamer.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectStreamer.cpp Thu May 28 16:36:02 2015
@@ -60,8 +60,8 @@ bool MCObjectStreamer::emitAbsoluteSymbo
// Must have symbol data.
if (!Assembler->hasSymbolData(*Hi) || !Assembler->hasSymbolData(*Lo))
return false;
- auto &HiD = Assembler->getSymbolData(*Hi);
- auto &LoD = Assembler->getSymbolData(*Lo);
+ auto &HiD = Hi->getData();
+ auto &LoD = Lo->getData();
// Must both be assigned to the same (valid) fragment.
if (!HiD.getFragment() || HiD.getFragment() != LoD.getFragment())
Modified: llvm/trunk/lib/MC/MCObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectWriter.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectWriter.cpp Thu May 28 16:36:02 2015
@@ -30,8 +30,8 @@ bool MCObjectWriter::IsSymbolRefDifferen
if (SA.isUndefined() || SB.isUndefined())
return false;
- const MCSymbolData &DataA = Asm.getSymbolData(SA);
- const MCSymbolData &DataB = Asm.getSymbolData(SB);
+ const MCSymbolData &DataA = SA.getData();
+ const MCSymbolData &DataB = SB.getData();
if(!DataA.getFragment() || !DataB.getFragment())
return false;
Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Thu May 28 16:36:02 2015
@@ -693,7 +693,7 @@ bool MachObjectWriter::IsSymbolRefDiffer
if (!hasReliableSymbolDifference) {
if (!SA.isInSection() || &SecA != &SecB ||
(!SA.isTemporary() &&
- FB.getAtom() != Asm.getSymbolData(SA).getFragment()->getAtom() &&
+ FB.getAtom() != SA.getData().getFragment()->getAtom() &&
Asm.getSubsectionsViaSymbols()))
return false;
return true;
@@ -717,7 +717,7 @@ bool MachObjectWriter::IsSymbolRefDiffer
if (&SecA != &SecB)
return false;
- const MCFragment *FA = Asm.getSymbolData(SA).getFragment();
+ const MCFragment *FA = SA.getData().getFragment();
// Bail if the symbol has no fragment.
if (!FA)
@@ -968,8 +968,7 @@ void MachObjectWriter::WriteObject(MCAss
static_cast<const MCSectionMachO &>(*it->Section);
if (Section.getType() == MachO::S_NON_LAZY_SYMBOL_POINTERS) {
// If this symbol is defined and internal, mark it as such.
- if (it->Symbol->isDefined() &&
- !Asm.getSymbolData(*it->Symbol).isExternal()) {
+ if (it->Symbol->isDefined() && !it->Symbol->getData().isExternal()) {
uint32_t Flags = MachO::INDIRECT_SYMBOL_LOCAL;
if (it->Symbol->isAbsolute())
Flags |= MachO::INDIRECT_SYMBOL_ABS;
Modified: llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp Thu May 28 16:36:02 2015
@@ -414,7 +414,7 @@ void WinCOFFObjectWriter::DefineSymbol(c
coff_symbol->MC = &Symbol;
} else {
- const MCSymbolData &ResSymData = Assembler.getSymbolData(Symbol);
+ const MCSymbolData &ResSymData = Symbol.getData();
const MCSymbol *Base = Layout.getBaseSymbol(Symbol);
coff_symbol->Data.Value = getSymbolValue(Symbol, Layout);
@@ -434,7 +434,7 @@ void WinCOFFObjectWriter::DefineSymbol(c
if (!Base) {
coff_symbol->Data.SectionNumber = COFF::IMAGE_SYM_ABSOLUTE;
} else {
- const MCSymbolData &BaseData = Assembler.getSymbolData(*Base);
+ const MCSymbolData &BaseData = Base->getData();
if (BaseData.getFragment()) {
COFFSection *Sec = SectionMap[BaseData.getFragment()->getParent()];
@@ -702,7 +702,7 @@ void WinCOFFObjectWriter::RecordRelocati
Twine("symbol '") + A.getName() +
"' can not be undefined");
- const MCSymbolData &A_SD = Asm.getSymbolData(A);
+ const MCSymbolData &A_SD = A.getData();
MCSection *Section = Fragment->getParent();
@@ -719,7 +719,7 @@ void WinCOFFObjectWriter::RecordRelocati
if (SymB) {
const MCSymbol *B = &SymB->getSymbol();
- const MCSymbolData &B_SD = Asm.getSymbolData(*B);
+ const MCSymbolData &B_SD = B->getData();
if (!B_SD.getFragment())
Asm.getContext().reportFatalError(
Fixup.getLoc(),
Modified: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp Thu May 28 16:36:02 2015
@@ -209,11 +209,11 @@ void AArch64MachObjectWriter::RecordRelo
}
} else if (Target.getSymB()) { // A - B + constant
const MCSymbol *A = &Target.getSymA()->getSymbol();
- const MCSymbolData &A_SD = Asm.getSymbolData(*A);
+ const MCSymbolData &A_SD = A->getData();
const MCSymbol *A_Base = Asm.getAtom(*A);
const MCSymbol *B = &Target.getSymB()->getSymbol();
- const MCSymbolData &B_SD = Asm.getSymbolData(*B);
+ const MCSymbolData &B_SD = B->getData();
const MCSymbol *B_Base = Asm.getAtom(*B);
// Check for "_foo at got - .", which comes through here as:
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Thu May 28 16:36:02 2015
@@ -601,7 +601,7 @@ void ARMAsmBackend::processFixupValue(co
// the offset when the destination has the same MCFragment.
if (A && (unsigned)Fixup.getKind() == ARM::fixup_arm_thumb_bl) {
const MCSymbol &Sym = A->getSymbol();
- const MCSymbolData &SymData = Asm.getSymbolData(Sym);
+ const MCSymbolData &SymData = Sym.getData();
IsResolved = (SymData.getFragment() == DF);
}
// We must always generate a relocation for BL/BLX instructions if we have
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp Thu May 28 16:36:02 2015
@@ -152,7 +152,7 @@ RecordARMScatteredHalfRelocation(MachObj
// See <reloc.h>.
const MCSymbol *A = &Target.getSymA()->getSymbol();
- const MCSymbolData *A_SD = &Asm.getSymbolData(*A);
+ const MCSymbolData *A_SD = &A->getData();
if (!A_SD->getFragment())
Asm.getContext().reportFatalError(Fixup.getLoc(),
@@ -166,7 +166,7 @@ RecordARMScatteredHalfRelocation(MachObj
FixedValue += SecAddr;
if (const MCSymbolRefExpr *B = Target.getSymB()) {
- const MCSymbolData *B_SD = &Asm.getSymbolData(B->getSymbol());
+ const MCSymbolData *B_SD = &B->getSymbol().getData();
if (!B_SD->getFragment())
Asm.getContext().reportFatalError(Fixup.getLoc(),
@@ -255,7 +255,7 @@ void ARMMachObjectWriter::RecordARMScatt
// See <reloc.h>.
const MCSymbol *A = &Target.getSymA()->getSymbol();
- const MCSymbolData *A_SD = &Asm.getSymbolData(*A);
+ const MCSymbolData *A_SD = &A->getData();
if (!A_SD->getFragment())
Asm.getContext().reportFatalError(Fixup.getLoc(),
@@ -270,7 +270,7 @@ void ARMMachObjectWriter::RecordARMScatt
if (const MCSymbolRefExpr *B = Target.getSymB()) {
assert(Type == MachO::ARM_RELOC_VANILLA && "invalid reloc for 2 symbols");
- const MCSymbolData *B_SD = &Asm.getSymbolData(B->getSymbol());
+ const MCSymbolData *B_SD = &B->getSymbol().getData();
if (!B_SD->getFragment())
Asm.getContext().reportFatalError(Fixup.getLoc(),
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp Thu May 28 16:36:02 2015
@@ -271,7 +271,7 @@ static unsigned getMatchingLoType(const
if (Type == ELF::R_MIPS16_HI16)
return ELF::R_MIPS16_LO16;
- const MCSymbolData &SD = Asm.getSymbolData(*Reloc.Symbol);
+ const MCSymbolData &SD = Reloc.Symbol->getData();
if (MCELF::GetBinding(SD) != ELF::STB_LOCAL)
return ELF::R_MIPS_NONE;
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp Thu May 28 16:36:02 2015
@@ -142,7 +142,7 @@ public:
// to resolve the fixup directly. Emit a relocation and leave
// resolution of the final target address to the linker.
if (const MCSymbolRefExpr *A = Target.getSymA()) {
- const MCSymbolData &Data = Asm.getSymbolData(A->getSymbol());
+ const MCSymbolData &Data = A->getSymbol().getData();
// The "other" values are stored in the last 6 bits of the second byte.
// The traditional defines for STO values assume the full byte and thus
// the shift to pack it.
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp Thu May 28 16:36:02 2015
@@ -206,7 +206,7 @@ bool PPCMachObjectWriter::RecordScattere
// See <reloc.h>.
const MCSymbol *A = &Target.getSymA()->getSymbol();
- const MCSymbolData *A_SD = &Asm.getSymbolData(*A);
+ const MCSymbolData *A_SD = &A->getData();
if (!A_SD->getFragment())
report_fatal_error("symbol '" + A->getName() +
@@ -219,7 +219,7 @@ bool PPCMachObjectWriter::RecordScattere
uint32_t Value2 = 0;
if (const MCSymbolRefExpr *B = Target.getSymB()) {
- const MCSymbolData *B_SD = &Asm.getSymbolData(B->getSymbol());
+ const MCSymbolData *B_SD = &B->getSymbol().getData();
if (!B_SD->getFragment())
report_fatal_error("symbol '" + B->getSymbol().getName() +
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp?rev=238506&r1=238505&r2=238506&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp Thu May 28 16:36:02 2015
@@ -142,13 +142,13 @@ void X86MachObjectWriter::RecordX86_64Re
const MCSymbol *A = &Target.getSymA()->getSymbol();
if (A->isTemporary())
A = &Writer->findAliasedSymbol(*A);
- const MCSymbolData &A_SD = Asm.getSymbolData(*A);
+ const MCSymbolData &A_SD = A->getData();
const MCSymbol *A_Base = Asm.getAtom(*A);
const MCSymbol *B = &Target.getSymB()->getSymbol();
if (B->isTemporary())
B = &Writer->findAliasedSymbol(*B);
- const MCSymbolData &B_SD = Asm.getSymbolData(*B);
+ const MCSymbolData &B_SD = B->getData();
const MCSymbol *B_Base = Asm.getAtom(*B);
// Neither symbol can be modified.
@@ -211,7 +211,7 @@ void X86MachObjectWriter::RecordX86_64Re
if (!Asm.getContext().getAsmInfo()->isSectionAtomizableBySymbols(Sec))
Asm.addLocalUsedInReloc(*Symbol);
}
- const MCSymbolData &SD = Asm.getSymbolData(*Symbol);
+ const MCSymbolData &SD = Symbol->getData();
RelSymbol = Asm.getAtom(*Symbol);
// Relocations inside debug sections always use local relocations when
@@ -354,7 +354,7 @@ bool X86MachObjectWriter::RecordScattere
// See <reloc.h>.
const MCSymbol *A = &Target.getSymA()->getSymbol();
- const MCSymbolData *A_SD = &Asm.getSymbolData(*A);
+ const MCSymbolData *A_SD = &A->getData();
if (!A_SD->getFragment())
report_fatal_error("symbol '" + A->getName() +
@@ -368,7 +368,7 @@ bool X86MachObjectWriter::RecordScattere
uint32_t Value2 = 0;
if (const MCSymbolRefExpr *B = Target.getSymB()) {
- const MCSymbolData *B_SD = &Asm.getSymbolData(B->getSymbol());
+ const MCSymbolData *B_SD = &B->getSymbol().getData();
if (!B_SD->getFragment())
report_fatal_error("symbol '" + B->getSymbol().getName() +
More information about the llvm-commits
mailing list