From a554c05d95dfe406de1613c78ab4eebf2c030adf Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 25 May 2015 23:14:17 +0000 Subject: Turn MCSectionData into a field of MCSection. This also changes MCAssembler to store a vector of MCSections instead of an iplist of MCSectionData. llvm-svn: 238159 --- llvm/lib/MC/MCSection.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'llvm/lib/MC/MCSection.cpp') diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp index 523c537..6ad6496 100644 --- a/llvm/lib/MC/MCSection.cpp +++ b/llvm/lib/MC/MCSection.cpp @@ -19,6 +19,9 @@ using namespace llvm; // MCSection //===----------------------------------------------------------------------===// +MCSection::MCSection(SectionVariant V, SectionKind K, MCSymbol *Begin) + : Begin(Begin), HasInstructions(false), Data(*this), Variant(V), Kind(K) {} + MCSymbol *MCSection::getEndSymbol(MCContext &Ctx) { if (!End) End = Ctx.createTempSymbol("sec_end", true); @@ -49,6 +52,14 @@ void MCSection::setBundleLockState(BundleLockStateType NewState) { ++BundleLockNestingDepth; } +MCSectionData::iterator MCSection::begin() { return Data.begin(); } + +MCSectionData::iterator MCSection::end() { return Data.end(); } + +MCSectionData::FragmentListType &MCSection::getFragmentList() { + return Data.getFragmentList(); +} + MCSectionData::iterator MCSectionData::begin() { return Fragments.begin(); } MCSectionData::iterator MCSectionData::end() { return Fragments.end(); } -- cgit v1.1