Replace getOrCreateSectionData with registerSection.

There is now no SectionData to be created.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238208 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-05-26 15:07:25 +00:00
parent 9ec47b85c7
commit b14ebd6a1d
7 changed files with 18 additions and 28 deletions

View File

@ -637,11 +637,10 @@ void MCELFStreamer::Flush() {
unsigned ByteAlignment = i->ByteAlignment;
MCSection &Section = Symbol.getSection();
MCSectionData &SectData = getAssembler().getOrCreateSectionData(Section);
new MCAlignFragment(ByteAlignment, 0, 1, ByteAlignment,
&SectData.getSection());
getAssembler().registerSection(Section);
new MCAlignFragment(ByteAlignment, 0, 1, ByteAlignment, &Section);
MCFragment *F = new MCFillFragment(0, 0, Size, &SectData.getSection());
MCFragment *F = new MCFillFragment(0, 0, Size, &Section);
Symbol.getData().setFragment(F);
// Update the maximum alignment of the section if necessary.