mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Insert MCSectionData into the section list directly in getOrCreateSectionData.
Removing the logic from the constructor will make it easier to merge MCSectionData and MCSection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238155 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -566,7 +566,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
// Only for use as sentinel.
|
// Only for use as sentinel.
|
||||||
MCSectionData();
|
MCSectionData();
|
||||||
MCSectionData(MCSection &Section, MCAssembler *A = nullptr);
|
MCSectionData(MCSection &Section);
|
||||||
|
|
||||||
MCSection &getSection() const { return *Section; }
|
MCSection &getSection() const { return *Section; }
|
||||||
|
|
||||||
@@ -971,8 +971,10 @@ public:
|
|||||||
|
|
||||||
if (Created)
|
if (Created)
|
||||||
*Created = !Entry;
|
*Created = !Entry;
|
||||||
if (!Entry)
|
if (!Entry) {
|
||||||
Entry = new MCSectionData(Section, this);
|
Entry = new MCSectionData(Section);
|
||||||
|
Sections.push_back(Entry);
|
||||||
|
}
|
||||||
|
|
||||||
return *Entry;
|
return *Entry;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -292,11 +292,7 @@ MCEncodedFragmentWithFixups::~MCEncodedFragmentWithFixups() {
|
|||||||
|
|
||||||
MCSectionData::MCSectionData() : Section(nullptr) {}
|
MCSectionData::MCSectionData() : Section(nullptr) {}
|
||||||
|
|
||||||
MCSectionData::MCSectionData(MCSection &Section, MCAssembler *A)
|
MCSectionData::MCSectionData(MCSection &Section) : Section(&Section) {}
|
||||||
: Section(&Section) {
|
|
||||||
if (A)
|
|
||||||
A->getSectionList().push_back(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
MCSectionData::iterator
|
MCSectionData::iterator
|
||||||
MCSectionData::getSubsectionInsertionPoint(unsigned Subsection) {
|
MCSectionData::getSubsectionInsertionPoint(unsigned Subsection) {
|
||||||
|
|||||||
Reference in New Issue
Block a user