summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-12-04 22:04:50 +0000
committerEric Christopher <echristo@gmail.com>2013-12-04 22:04:50 +0000
commitf8790646b2820d6c5db13c65a820f8d6936d1c0b (patch)
treedbe51ba3e1385949ae53d34772ed84b0c36db6bd /llvm/lib/CodeGen
parent08dfb634e481dfbf932acd27cdc524626aa2991e (diff)
downloadbcm5719-llvm-f8790646b2820d6c5db13c65a820f8d6936d1c0b.tar.gz
bcm5719-llvm-f8790646b2820d6c5db13c65a820f8d6936d1c0b.zip
Make RangeSpanList take a symbol for the beginning of the range
rather than magically making the names match. llvm-svn: 196419
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp11
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h6
2 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 98cb0fb9073..c33042db345 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -469,9 +469,9 @@ void DwarfDebug::addScopeRangeList(CompileUnit *TheCU, DIE *ScopeDIE,
const SmallVectorImpl<InsnRange> &Range) {
// Emit offset in .debug_range as a relocatable label. emitDIE will handle
// emitting it appropriately.
- TheCU->addSectionLabel(ScopeDIE, dwarf::DW_AT_ranges,
- Asm->GetTempSymbol("debug_ranges", GlobalRangeCount));
- RangeSpanList List(GlobalRangeCount++);
+ MCSymbol *RangeSym = Asm->GetTempSymbol("debug_ranges", GlobalRangeCount++);
+ TheCU->addSectionLabel(ScopeDIE, dwarf::DW_AT_ranges, RangeSym);
+ RangeSpanList List(RangeSym);
for (SmallVectorImpl<InsnRange>::const_iterator RI = Range.begin(),
RE = Range.end();
RI != RE; ++RI) {
@@ -2940,9 +2940,8 @@ void DwarfDebug::emitDebugRanges() {
I != E; ++I) {
const RangeSpanList &List = *I;
- // Emit a symbol so we can find the beginning of the range.
- Asm->OutStreamer.EmitLabel(
- Asm->GetTempSymbol("debug_ranges", List.getIndex()));
+ // Emit our symbol so we can find the beginning of the range.
+ Asm->OutStreamer.EmitLabel(List.getSym());
for (SmallVectorImpl<RangeSpan>::const_iterator
RI = List.getRanges().begin(),
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
index ce9faf02509..f8623100679 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
@@ -45,13 +45,13 @@ private:
class RangeSpanList {
private:
// Index for locating within the debug_range section this particular span.
- unsigned Index;
+ MCSymbol *RangeSym;
// List of ranges.
SmallVector<RangeSpan, 2> Ranges;
public:
- RangeSpanList(unsigned Idx) : Index(Idx) {}
- unsigned getIndex() const { return Index; }
+ RangeSpanList(MCSymbol *Sym) : RangeSym(Sym) {}
+ MCSymbol *getSym() const { return RangeSym; }
const SmallVectorImpl<RangeSpan> &getRanges() const { return Ranges; }
void addRange(RangeSpan Range) { Ranges.push_back(Range); }
};
OpenPOWER on IntegriCloud