diff options
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index 74eee83b73f..ad70d61dccb 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -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"); |