mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-01 07:30:31 +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:
parent
002c5281ef
commit
0d46e8a420
@ -566,7 +566,7 @@ private:
|
||||
public:
|
||||
// Only for use as sentinel.
|
||||
MCSectionData();
|
||||
MCSectionData(MCSection &Section, MCAssembler *A = nullptr);
|
||||
MCSectionData(MCSection &Section);
|
||||
|
||||
MCSection &getSection() const { return *Section; }
|
||||
|
||||
@ -971,8 +971,10 @@ public:
|
||||
|
||||
if (Created)
|
||||
*Created = !Entry;
|
||||
if (!Entry)
|
||||
Entry = new MCSectionData(Section, this);
|
||||
if (!Entry) {
|
||||
Entry = new MCSectionData(Section);
|
||||
Sections.push_back(Entry);
|
||||
}
|
||||
|
||||
return *Entry;
|
||||
}
|
||||
|
@ -292,11 +292,7 @@ MCEncodedFragmentWithFixups::~MCEncodedFragmentWithFixups() {
|
||||
|
||||
MCSectionData::MCSectionData() : Section(nullptr) {}
|
||||
|
||||
MCSectionData::MCSectionData(MCSection &Section, MCAssembler *A)
|
||||
: Section(&Section) {
|
||||
if (A)
|
||||
A->getSectionList().push_back(this);
|
||||
}
|
||||
MCSectionData::MCSectionData(MCSection &Section) : Section(&Section) {}
|
||||
|
||||
MCSectionData::iterator
|
||||
MCSectionData::getSubsectionInsertionPoint(unsigned Subsection) {
|
||||
|
Loading…
Reference in New Issue
Block a user