X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FMC%2FMCAssembler.cpp;h=868b0f1228af409536eddce0b982ba3acb87f120;hp=ec2518c77ddbbfa4d6ae7412d16599a83eac00a6;hb=899cab6126f1283d5a48444e97f52400f28fb0fa;hpb=b16799681930016c6df3adc26c667ad55975f959 diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index ec2518c77dd..868b0f1228a 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -288,10 +288,6 @@ MCEncodedFragmentWithFixups::~MCEncodedFragmentWithFixups() { /* *** */ -MCSectionData::MCSectionData(MCSection &Section) : Section(&Section) {} - -/* *** */ - MCAssembler::MCAssembler(MCContext &Context_, MCAsmBackend &Backend_, MCCodeEmitter &Emitter_, MCObjectWriter &Writer_, raw_ostream &OS_) @@ -744,8 +740,8 @@ void MCAssembler::writeSectionData(const MCSection *Sec, assert(Layout.getSectionFileSize(Sec) == 0 && "Invalid size for section!"); // Check that contents are only things legal inside a virtual section. - for (MCSectionData::const_iterator it = Sec->begin(), ie = Sec->end(); - it != ie; ++it) { + for (MCSection::const_iterator it = Sec->begin(), ie = Sec->end(); it != ie; + ++it) { switch (it->getKind()) { default: llvm_unreachable("Invalid fragment in virtual section!"); case MCFragment::FT_Data: { @@ -786,8 +782,8 @@ void MCAssembler::writeSectionData(const MCSection *Sec, uint64_t Start = getWriter().getStream().tell(); (void)Start; - for (MCSectionData::const_iterator it = Sec->begin(), ie = Sec->end(); - it != ie; ++it) + for (MCSection::const_iterator it = Sec->begin(), ie = Sec->end(); it != ie; + ++it) writeFragment(*this, Layout, *it); assert(getWriter().getStream().tell() - Start == @@ -837,7 +833,7 @@ void MCAssembler::Finish() { Sec->setLayoutOrder(i); unsigned FragmentIndex = 0; - for (MCSectionData::iterator iFrag = Sec->begin(), iFragEnd = Sec->end(); + for (MCSection::iterator iFrag = Sec->begin(), iFragEnd = Sec->end(); iFrag != iFragEnd; ++iFrag) iFrag->setLayoutOrder(FragmentIndex++); } @@ -865,8 +861,8 @@ void MCAssembler::Finish() { // Evaluate and apply the fixups, generating relocation entries as necessary. for (MCAssembler::iterator it = begin(), ie = end(); it != ie; ++it) { - for (MCSectionData::iterator it2 = it->begin(), - ie2 = it->end(); it2 != ie2; ++it2) { + for (MCSection::iterator it2 = it->begin(), ie2 = it->end(); it2 != ie2; + ++it2) { MCEncodedFragmentWithFixups *F = dyn_cast(it2); if (F) { @@ -1009,7 +1005,7 @@ bool MCAssembler::layoutSectionOnce(MCAsmLayout &Layout, MCSection &Sec) { MCFragment *FirstRelaxedFragment = nullptr; // Attempt to relax all the fragments in the section. - for (MCSectionData::iterator I = Sec.begin(), IE = Sec.end(); I != IE; ++I) { + for (MCSection::iterator I = Sec.begin(), IE = Sec.end(); I != IE; ++I) { // Check if this is a fragment that needs relaxation. bool RelaxedFrag = false; switch(I->getKind()) { @@ -1188,18 +1184,6 @@ void MCFragment::dump() { OS << ">"; } -void MCSectionData::dump() { - raw_ostream &OS = llvm::errs(); - - OS << "dump(); - } - OS << "]>"; -} - void MCSymbolData::dump() const { raw_ostream &OS = llvm::errs(); @@ -1225,7 +1209,7 @@ void MCAssembler::dump() { OS << " Sections:[\n "; for (iterator it = begin(), ie = end(); it != ie; ++it) { if (it != begin()) OS << ",\n "; - it->getSectionData().dump(); + it->dump(); } OS << "],\n"; OS << " Symbols:[";