Remove yet another method of creating begin and end symbol for sections.

I missed this one when first unifying how we handle begin and end symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237912 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-05-21 16:52:32 +00:00
parent dc089e4dc3
commit 43356a1a45
6 changed files with 36 additions and 49 deletions

View File

@@ -610,9 +610,9 @@ static void EmitGenDwarfAranges(MCStreamer *MCOS,
// Now emit the table of pairs of PointerSize'ed values for the section
// addresses and sizes.
for (const auto &sec : Sections) {
MCSymbol *StartSymbol = sec.second.first;
MCSymbol *EndSymbol = sec.second.second;
for (const MCSection *Sec : Sections) {
MCSymbol *StartSymbol = Sec->getBeginSymbol();
MCSymbol *EndSymbol = Sec->getEndSymbol(context);
assert(StartSymbol && "StartSymbol must not be NULL");
assert(EndSymbol && "EndSymbol must not be NULL");
@@ -699,8 +699,8 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS,
const auto TextSection = Sections.begin();
assert(TextSection != Sections.end() && "No text section found");
MCSymbol *StartSymbol = TextSection->second.first;
MCSymbol *EndSymbol = TextSection->second.second;
MCSymbol *StartSymbol = (*TextSection)->getBeginSymbol();
MCSymbol *EndSymbol = (*TextSection)->getEndSymbol(context);
assert(StartSymbol && "StartSymbol must not be NULL");
assert(EndSymbol && "EndSymbol must not be NULL");
@@ -805,10 +805,9 @@ static void EmitGenDwarfRanges(MCStreamer *MCOS) {
MCOS->SwitchSection(context.getObjectFileInfo()->getDwarfRangesSection());
for (const auto &sec : Sections) {
MCSymbol *StartSymbol = sec.second.first;
MCSymbol *EndSymbol = sec.second.second;
for (const MCSection *Sec : Sections) {
MCSymbol *StartSymbol = Sec->getBeginSymbol();
MCSymbol *EndSymbol = Sec->getEndSymbol(context);
assert(StartSymbol && "StartSymbol must not be NULL");
assert(EndSymbol && "EndSymbol must not be NULL");