summaryrefslogtreecommitdiff
path: root/lib/MC/MCSection.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-05-25 23:14:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-05-25 23:14:17 +0000
commite86bc4693907f34e8f59b4e715992417d0994ad1 (patch)
tree99b18874bb8dc428b2e9ce0f7d2872aa073c4a3a /lib/MC/MCSection.cpp
parent5e435847b007766c4e6f6c27021918bbd22ecd58 (diff)
Turn MCSectionData into a field of MCSection.
This also changes MCAssembler to store a vector of MCSections instead of an iplist of MCSectionData. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCSection.cpp')
-rw-r--r--lib/MC/MCSection.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/MC/MCSection.cpp b/lib/MC/MCSection.cpp
index 523c53787ce..6ad6496fcb9 100644
--- a/lib/MC/MCSection.cpp
+++ b/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(); }