Revert "Use the range machinery for DW_AT_ranges and DW_AT_high/lo_pc."

This appears to trigger failures with optimization and function arguments somehow.

This reverts commit r204277.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204286 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-03-20 00:12:06 +00:00
parent eb7dcd71d6
commit 5a8743ef85
10 changed files with 143 additions and 244 deletions

View File

@ -41,7 +41,6 @@ public:
RangeSpan(MCSymbol *S, MCSymbol *E) : Start(S), End(E) {}
const MCSymbol *getStart() const { return Start; }
const MCSymbol *getEnd() const { return End; }
void setEnd(const MCSymbol *E) { End = E; }
private:
const MCSymbol *Start, *End;
@ -252,7 +251,11 @@ public:
bool hasContent() const { return !UnitDie->getChildren().empty(); }
/// addRange - Add an address range to the list of ranges for this unit.
void addRange(RangeSpan Range);
void addRange(RangeSpan Range) {
// Only add a range for this unit if we're emitting full debug.
if (getCUNode().getEmissionKind() == DIBuilder::FullDebug)
CURanges.push_back(Range);
}
/// getRanges - Get the list of ranges for this unit.
const SmallVectorImpl<RangeSpan> &getRanges() const { return CURanges; }
@ -580,13 +583,7 @@ public:
/// addLabelAddress - Add a dwarf label attribute data and value using
/// either DW_FORM_addr or DW_FORM_GNU_addr_index.
void addLabelAddress(DIE *Die, dwarf::Attribute Attribute,
const MCSymbol *Label);
/// addLocalLabelAddress - Add a dwarf label attribute data and value using
/// DW_FORM_addr only.
void addLocalLabelAddress(DIE *Die, dwarf::Attribute Attribute,
const MCSymbol *Label);
void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label);
DwarfCompileUnit &getCU() override { return *this; }