MC: Use MCSymbol in MCObjectWriter::isWeak(), NFC

Continue to prefer `MCSymbol` when we need both.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-05-20 15:10:03 +00:00
parent 8ca7ac2a38
commit f5bdf04f09
5 changed files with 9 additions and 10 deletions

View File

@ -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;