From 508e0c4d343bd1d58e4112ad4b50d1f9832f6709 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 7 Mar 2014 07:36:05 +0000 Subject: 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 --- lib/MC/MachObjectWriter.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/MC/MachObjectWriter.cpp') 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(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(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(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(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()) { -- cgit v1.2.3