summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2019-08-06 10:49:40 +0000
committerIgor Kudrin <ikudrin@accesssoftek.com>2019-08-06 10:49:40 +0000
commitf26a70a5e7b7b8715eadcb6dec3ff39a267fc666 (patch)
treed178246aab19aded049ff79111d90654bdbfe497 /llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
parentf5f35c5cd110e22c4b216ec1dc53255e32adc011 (diff)
downloadbcm5719-llvm-f26a70a5e7b7b8715eadcb6dec3ff39a267fc666.tar.gz
bcm5719-llvm-f26a70a5e7b7b8715eadcb6dec3ff39a267fc666.zip
Switch LLVM to use 64-bit offsets (2/5)
This updates all libraries and tools in LLVM Core to use 64-bit offsets which directly or indirectly come to DataExtractor. Differential Revision: https://reviews.llvm.org/D65638 llvm-svn: 368014
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
index d8df81a0aa0..1a1857d8cd7 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugRangeList.cpp
@@ -17,17 +17,17 @@
using namespace llvm;
void DWARFDebugRangeList::clear() {
- Offset = -1U;
+ Offset = -1ULL;
AddressSize = 0;
Entries.clear();
}
Error DWARFDebugRangeList::extract(const DWARFDataExtractor &data,
- uint32_t *offset_ptr) {
+ uint64_t *offset_ptr) {
clear();
if (!data.isValidOffset(*offset_ptr))
return createStringError(errc::invalid_argument,
- "invalid range list offset 0x%" PRIx32, *offset_ptr);
+ "invalid range list offset 0x%" PRIx64, *offset_ptr);
AddressSize = data.getAddressSize();
if (AddressSize != 4 && AddressSize != 8)
@@ -38,7 +38,7 @@ Error DWARFDebugRangeList::extract(const DWARFDataExtractor &data,
RangeListEntry Entry;
Entry.SectionIndex = -1ULL;
- uint32_t prev_offset = *offset_ptr;
+ uint64_t prev_offset = *offset_ptr;
Entry.StartAddress = data.getRelocatedAddress(offset_ptr);
Entry.EndAddress =
data.getRelocatedAddress(offset_ptr, &Entry.SectionIndex);
@@ -47,7 +47,7 @@ Error DWARFDebugRangeList::extract(const DWARFDataExtractor &data,
if (*offset_ptr != prev_offset + 2 * AddressSize) {
clear();
return createStringError(errc::invalid_argument,
- "invalid range list entry at offset 0x%" PRIx32,
+ "invalid range list entry at offset 0x%" PRIx64,
prev_offset);
}
if (Entry.isEndOfListEntry())
@@ -59,12 +59,12 @@ Error DWARFDebugRangeList::extract(const DWARFDataExtractor &data,
void DWARFDebugRangeList::dump(raw_ostream &OS) const {
for (const RangeListEntry &RLE : Entries) {
- const char *format_str = (AddressSize == 4
- ? "%08x %08" PRIx64 " %08" PRIx64 "\n"
- : "%08x %016" PRIx64 " %016" PRIx64 "\n");
+ const char *format_str =
+ (AddressSize == 4 ? "%08" PRIx64 " %08" PRIx64 " %08" PRIx64 "\n"
+ : "%08" PRIx64 " %016" PRIx64 " %016" PRIx64 "\n");
OS << format(format_str, Offset, RLE.StartAddress, RLE.EndAddress);
}
- OS << format("%08x <End of list>\n", Offset);
+ OS << format("%08" PRIx64 " <End of list>\n", Offset);
}
DWARFAddressRangesVector DWARFDebugRangeList::getAbsoluteRanges(
OpenPOWER on IntegriCloud