diff options
author | George Rimar <grimar@accesssoftek.com> | 2017-05-16 12:30:59 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2017-05-16 12:30:59 +0000 |
commit | 4671f2e08c4ccd793433a319ed6e209941b987be (patch) | |
tree | cd0a31c849a742fb95f156814dbd0842570caccd /llvm/lib/DebugInfo/DWARF/DWARFDie.cpp | |
parent | 3824cca7b3a9515566b410db8292828acff6f739 (diff) | |
download | bcm5719-llvm-4671f2e08c4ccd793433a319ed6e209941b987be.tar.gz bcm5719-llvm-4671f2e08c4ccd793433a319ed6e209941b987be.zip |
[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for DWARFAddressRangesVector.
Recommit of r303159 "[DWARF] - Use DWARFAddressRange struct instead of uint64_t pair for DWARFAddressRangesVector"
All places were shitched to use DWARFAddressRange now.
Suggested during review of D33184.
llvm-svn: 303163
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDie.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDie.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp index 24039eb3520..e3bd759ba94 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp @@ -60,8 +60,8 @@ static void dumpRanges(raw_ostream &OS, const DWARFAddressRangesVector& Ranges, OS << '\n'; OS.indent(Indent); OS << format("[0x%0*" PRIx64 " - 0x%0*" PRIx64 ")", - AddressSize*2, Range.first, - AddressSize*2, Range.second); + AddressSize*2, Range.LowPC, + AddressSize*2, Range.HighPC); } } @@ -229,9 +229,9 @@ DWARFDie::getAddressRanges() const { return DWARFAddressRangesVector(); // Single range specified by low/high PC. uint64_t LowPC, HighPC; - if (getLowAndHighPC(LowPC, HighPC)) { - return DWARFAddressRangesVector(1, std::make_pair(LowPC, HighPC)); - } + if (getLowAndHighPC(LowPC, HighPC)) + return {{LowPC, HighPC}}; + // Multiple ranges from .debug_ranges section. auto RangesOffset = toSectionOffset(find(DW_AT_ranges)); if (RangesOffset) { @@ -257,7 +257,7 @@ DWARFDie::collectChildrenAddressRanges(DWARFAddressRangesVector& Ranges) const { bool DWARFDie::addressRangeContainsAddress(const uint64_t Address) const { for (const auto& R : getAddressRanges()) { - if (R.first <= Address && Address < R.second) + if (R.LowPC <= Address && Address < R.HighPC) return true; } return false; |