diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-03-07 07:36:05 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-03-07 07:36:05 +0000 |
commit | 508e0c4d343bd1d58e4112ad4b50d1f9832f6709 (patch) | |
tree | b5465b369b54168f7dd5191371bb362b84a66b49 /lib/MC/MachObjectWriter.cpp | |
parent | 6a2154ebd932a3949cdcc23d0b21ea4af4785058 (diff) | |
download | llvm-508e0c4d343bd1d58e4112ad4b50d1f9832f6709.tar.gz llvm-508e0c4d343bd1d58e4112ad4b50d1f9832f6709.tar.bz2 llvm-508e0c4d343bd1d58e4112ad4b50d1f9832f6709.tar.xz |
MC: Remove superfluous section attribute flag definitions
Summary:
llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same
definitions for the section flags. Instead, grab the definitions out of
support.
No functionality change.
Reviewers: grosbach, Bigcheese, rafael
Reviewed By: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2998
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MachObjectWriter.cpp')
-rw-r--r-- | lib/MC/MachObjectWriter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp index 4143d783e2..00347f546f 100644 --- a/lib/MC/MachObjectWriter.cpp +++ b/lib/MC/MachObjectWriter.cpp @@ -229,7 +229,7 @@ void MachObjectWriter::WriteSection(const MCAssembler &Asm, unsigned Flags = Section.getTypeAndAttributes(); if (SD.hasInstructions()) - Flags |= MCSectionMachO::S_ATTR_SOME_INSTRUCTIONS; + Flags |= MachO::S_ATTR_SOME_INSTRUCTIONS; assert(isPowerOf2_32(SD.getAlignment()) && "Invalid alignment!"); Write32(Log2_32(SD.getAlignment())); @@ -437,9 +437,9 @@ void MachObjectWriter::BindIndirectSymbols(MCAssembler &Asm) { const MCSectionMachO &Section = cast<MCSectionMachO>(it->SectionData->getSection()); - if (Section.getType() != MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS && - Section.getType() != MCSectionMachO::S_LAZY_SYMBOL_POINTERS && - Section.getType() != MCSectionMachO::S_SYMBOL_STUBS) { + if (Section.getType() != MachO::S_NON_LAZY_SYMBOL_POINTERS && + Section.getType() != MachO::S_LAZY_SYMBOL_POINTERS && + Section.getType() != MachO::S_SYMBOL_STUBS) { MCSymbol &Symbol = *it->Symbol; report_fatal_error("indirect symbol '" + Symbol.getName() + "' not in a symbol pointer or stub section"); @@ -453,7 +453,7 @@ void MachObjectWriter::BindIndirectSymbols(MCAssembler &Asm) { const MCSectionMachO &Section = cast<MCSectionMachO>(it->SectionData->getSection()); - if (Section.getType() != MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS) + if (Section.getType() != MachO::S_NON_LAZY_SYMBOL_POINTERS) continue; // Initialize the section indirect symbol base, if necessary. @@ -469,8 +469,8 @@ void MachObjectWriter::BindIndirectSymbols(MCAssembler &Asm) { const MCSectionMachO &Section = cast<MCSectionMachO>(it->SectionData->getSection()); - if (Section.getType() != MCSectionMachO::S_LAZY_SYMBOL_POINTERS && - Section.getType() != MCSectionMachO::S_SYMBOL_STUBS) + if (Section.getType() != MachO::S_LAZY_SYMBOL_POINTERS && + Section.getType() != MachO::S_SYMBOL_STUBS) continue; // Initialize the section indirect symbol base, if necessary. @@ -921,7 +921,7 @@ void MachObjectWriter::WriteObject(MCAssembler &Asm, // special handling. const MCSectionMachO &Section = static_cast<const MCSectionMachO&>(it->SectionData->getSection()); - if (Section.getType() == MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS) { + if (Section.getType() == MachO::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()) { |