mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Remove unnecessary uses of AliasedSymbol.
As pr19627 points out, every use of AliasedSymbol is likely a bug. The main use was to avoid the oddity of a variable showing up as undefined. That was fixed in r233995, which made these calls nops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234169 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -27,7 +27,7 @@ bool MCObjectWriter::IsSymbolRefDifferenceFullyResolved(
|
||||
|
||||
const MCSymbol &SA = A->getSymbol();
|
||||
const MCSymbol &SB = B->getSymbol();
|
||||
if (SA.AliasedSymbol().isUndefined() || SB.AliasedSymbol().isUndefined())
|
||||
if (SA.isUndefined() || SB.isUndefined())
|
||||
return false;
|
||||
|
||||
const MCSymbolData &DataA = Asm.getSymbolData(SA);
|
||||
@@ -43,7 +43,7 @@ bool MCObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(
|
||||
const MCAssembler &Asm, const MCSymbolData &DataA,
|
||||
const MCSymbolData *DataB, const MCFragment &FB, bool InSet,
|
||||
bool IsPCRel) const {
|
||||
const MCSection &SecA = DataA.getSymbol().AliasedSymbol().getSection();
|
||||
const MCSection &SecA = DataA.getSymbol().getSection();
|
||||
const MCSection &SecB = FB.getParent()->getSection();
|
||||
// On ELF and COFF A - B is absolute if A and B are in the same section.
|
||||
return &SecA == &SecB;
|
||||
|
Reference in New Issue
Block a user