diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-20 15:10:03 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-05-20 15:10:03 +0000 |
commit | 5266ad9bec7ce11498edef67a4d2942366332f37 (patch) | |
tree | c2227facddeb65da6c58f7b2ae44ce98225e4a9b /llvm/lib/MC/ELFObjectWriter.cpp | |
parent | e8048f0d90e9fcdc37e189bf3a59872763411853 (diff) | |
download | bcm5719-llvm-5266ad9bec7ce11498edef67a4d2942366332f37.tar.gz bcm5719-llvm-5266ad9bec7ce11498edef67a4d2942366332f37.zip |
MC: Use MCSymbol in MCObjectWriter::isWeak(), NFC
Continue to prefer `MCSymbol` when we need both.
llvm-svn: 237798
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 30aa1bdd045..c36da56f0ce 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -250,7 +250,7 @@ class ELFObjectWriter : public MCObjectWriter { bool InSet, bool IsPCRel) const override; - bool isWeak(const MCSymbolData &SD) const override; + bool isWeak(const MCSymbol &Sym) const override; void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) override; void writeSection(MCAssembler &Asm, @@ -1478,7 +1478,8 @@ bool ELFObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl( InSet, IsPCRel); } -bool ELFObjectWriter::isWeak(const MCSymbolData &SD) const { +bool ELFObjectWriter::isWeak(const MCSymbol &Sym) const { + const MCSymbolData &SD = Sym.getData(); if (::isWeak(SD)) return true; @@ -1491,7 +1492,6 @@ bool ELFObjectWriter::isWeak(const MCSymbolData &SD) const { if (MCELF::GetBinding(SD) != ELF::STB_GLOBAL) return false; - const MCSymbol &Sym = SD.getSymbol(); if (!Sym.isInSection()) return false; |