aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-05-21 16:52:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-05-21 16:52:32 +0000
commite07467901bd01aab87614890ef240e19f4ff3f4b (patch)
treec0ac8cb4ec60de1c50b619323a19a0166819293d /llvm/lib/MC/MCDwarf.cpp
parentcc672026cb37aefe6bd5fa6a0ba32e034345017d (diff)
downloadllvm-e07467901bd01aab87614890ef240e19f4ff3f4b.zip
llvm-e07467901bd01aab87614890ef240e19f4ff3f4b.tar.gz
llvm-e07467901bd01aab87614890ef240e19f4ff3f4b.tar.bz2
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. llvm-svn: 237912
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 74eee83..ad70d61 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");