Remove most uses of MCSectionData from MCAssembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-05-26 02:17:21 +00:00
parent ea3533b4c6
commit 2224f64c6d
8 changed files with 30 additions and 46 deletions

View File

@@ -535,7 +535,7 @@ public:
// FIXME: This really doesn't belong here. See comments below.
struct IndirectSymbolData {
MCSymbol *Symbol;
MCSectionData *SectionData;
MCSection *Section;
};
// FIXME: Ditto this. Purely so the Streamer and the ObjectWriter can talk
@@ -679,7 +679,7 @@ private:
/// \brief Perform one layout iteration of the given section and return true
/// if any offsets were adjusted.
bool layoutSectionOnce(MCAsmLayout &Layout, MCSectionData &SD);
bool layoutSectionOnce(MCAsmLayout &Layout, MCSection &Sec);
bool relaxInstruction(MCAsmLayout &Layout, MCRelaxableFragment &IF);
@@ -715,7 +715,7 @@ public:
bool isSymbolLinkerVisible(const MCSymbol &SD) const;
/// Emit the section contents using the given object writer.
void writeSectionData(const MCSectionData *Section,
void writeSectionData(const MCSection *Section,
const MCAsmLayout &Layout) const;
/// Check whether a given symbol has been flagged with .thumb_func.
@@ -884,16 +884,6 @@ public:
/// \name Backend Data Access
/// @{
MCSectionData &getSectionData(MCSection &Section) {
assert(Sections.count(&Section) && "Unknown Seciton");
return Section.getSectionData();
}
const MCSectionData &getSectionData(const MCSection &Section) const {
return const_cast<MCAssembler *>(this)
->getSectionData(const_cast<MCSection &>(Section));
}
MCSectionData &getOrCreateSectionData(MCSection &Section,
bool *Created = nullptr) {
bool C = Sections.insert(&Section);