diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-15 21:56:38 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-15 21:56:38 +0000 |
commit | 232dc953ac850f7206b43de53192eff75487b1f8 (patch) | |
tree | efbabb4297482e56cd0b1361fe0a3f7e3358bb51 /llvm/lib/MC/MCAssembler.cpp | |
parent | b21991c4f5a64a4c0105e747c36b3bbb40dbd69a (diff) | |
download | bcm5719-llvm-232dc953ac850f7206b43de53192eff75487b1f8.tar.gz bcm5719-llvm-232dc953ac850f7206b43de53192eff75487b1f8.zip |
MC/Mach-O: Add MCSectionMachO::getType()
llvm-svn: 98582
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index a207d9952b0..0d00ed17525 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -52,8 +52,7 @@ static uint64_t WriteNopData(uint64_t Count, MachObjectWriter &MOW); static bool isVirtualSection(const MCSection &Section) { // FIXME: Lame. const MCSectionMachO &SMO = static_cast<const MCSectionMachO&>(Section); - unsigned Type = SMO.getTypeAndAttributes() & MCSectionMachO::SECTION_TYPE; - return (Type == MCSectionMachO::S_ZEROFILL); + return (SMO.getType() == MCSectionMachO::S_ZEROFILL); } static unsigned getFixupKindLog2Size(unsigned Kind) { @@ -615,9 +614,7 @@ public: const MCSectionMachO &Section = static_cast<const MCSectionMachO&>(it->SectionData->getSection()); - unsigned Type = - Section.getTypeAndAttributes() & MCSectionMachO::SECTION_TYPE; - if (Type != MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS) + if (Section.getType() != MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS) continue; Asm.getOrCreateSymbolData(*it->Symbol); @@ -630,10 +627,8 @@ public: const MCSectionMachO &Section = static_cast<const MCSectionMachO&>(it->SectionData->getSection()); - unsigned Type = - Section.getTypeAndAttributes() & MCSectionMachO::SECTION_TYPE; - if (Type != MCSectionMachO::S_LAZY_SYMBOL_POINTERS && - Type != MCSectionMachO::S_SYMBOL_STUBS) + if (Section.getType() != MCSectionMachO::S_LAZY_SYMBOL_POINTERS && + Section.getType() != MCSectionMachO::S_SYMBOL_STUBS) continue; // Set the symbol type to undefined lazy, but only on construction. @@ -911,9 +906,7 @@ public: // special handling. const MCSectionMachO &Section = static_cast<const MCSectionMachO&>(it->SectionData->getSection()); - unsigned Type = - Section.getTypeAndAttributes() & MCSectionMachO::SECTION_TYPE; - if (Type == MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS) { + if (Section.getType() == MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS) { // If this symbol is defined and internal, mark it as such. if (it->Symbol->isDefined() && !Asm.getSymbolData(*it->Symbol).isExternal()) { |