diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-16 20:04:29 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-16 20:04:29 +0000 |
commit | 843aa1f15b06fc3c2b39740ffb5bffd2fa6827ce (patch) | |
tree | 77dd9a4770ea1b9a3449869ef937398cb15309c5 /lib/MC/MCAssembler.cpp | |
parent | 83b467178a8295048f3ee7b44ff9c7ea244a96cc (diff) |
MC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106142 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAssembler.cpp')
-rw-r--r-- | lib/MC/MCAssembler.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index c971ee207f..69f40a1c19 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -308,24 +308,23 @@ static bool isScatteredFixupFullyResolved(const MCAssembler &Asm, return !B_Base && BaseSymbol == A_Base; } -bool MCAssembler::isSymbolLinkerVisible(const MCSymbolData *SD) const { +bool MCAssembler::isSymbolLinkerVisible(const MCSymbol &Symbol) const { // Non-temporary labels should always be visible to the linker. - if (!SD->getSymbol().isTemporary()) + if (!Symbol.isTemporary()) return true; // Absolute temporary labels are never visible. - if (!SD->getFragment()) + if (!Symbol.isInSection()) return false; // Otherwise, check if the section requires symbols even for temporary labels. - return getBackend().doesSectionRequireSymbols( - SD->getFragment()->getParent()->getSection()); + return getBackend().doesSectionRequireSymbols(Symbol.getSection()); } const MCSymbolData *MCAssembler::getAtom(const MCAsmLayout &Layout, const MCSymbolData *SD) const { // Linker visible symbols define atoms. - if (isSymbolLinkerVisible(SD)) + if (isSymbolLinkerVisible(SD->getSymbol())) return SD; // Absolute and undefined symbols have no defining atom. |