summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectWriter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-04-06 16:10:05 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-04-06 16:10:05 +0000
commit972756b741cd1a1efd23e93505cdf7931e6710c5 (patch)
tree81806deebe7adc1eb6bdfd57c2a68ac74b202a5a /llvm/lib/MC/MCObjectWriter.cpp
parentf77031f99d082aed8178f5bd09d8736a99c1789f (diff)
downloadbcm5719-llvm-972756b741cd1a1efd23e93505cdf7931e6710c5.tar.gz
bcm5719-llvm-972756b741cd1a1efd23e93505cdf7931e6710c5.zip
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. llvm-svn: 234169
Diffstat (limited to 'llvm/lib/MC/MCObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/MCObjectWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCObjectWriter.cpp b/llvm/lib/MC/MCObjectWriter.cpp
index 33e4556e102..e40c07d5527 100644
--- a/llvm/lib/MC/MCObjectWriter.cpp
+++ b/llvm/lib/MC/MCObjectWriter.cpp
@@ -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;
OpenPOWER on IntegriCloud