summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2017-06-29 16:52:08 +0000
committerPaul Robinson <paul.robinson@sony.com>2017-06-29 16:52:08 +0000
commit17536b935ae8a4ef2679ae5ccd541eddc60dceed (patch)
tree73d94728c989ff925143beb251bec0d2048b93a9 /llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
parent0ce4999002659c659510a1b5bd8478da31c2a5ee (diff)
downloadbcm5719-llvm-17536b935ae8a4ef2679ae5ccd541eddc60dceed.tar.gz
bcm5719-llvm-17536b935ae8a4ef2679ae5ccd541eddc60dceed.zip
[DWARF] NFC: DWARFDataExtractor combines relocs with DataExtractor.
Requires callers to directly associate relocations with a DataExtractor used to read data from a DWARF section, which helps a callee not make assumptions about which section it is reading. This is the next step in reducing DWARFFormValue's dependence on DWARFUnit. Differential Revision: https://reviews.llvm.org/D34704 llvm-svn: 306699
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
index 2178bef65d1..c240dd7406d 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
@@ -40,9 +40,9 @@ void DWARFDebugLoc::dump(raw_ostream &OS) const {
}
}
-void DWARFDebugLoc::parse(DataExtractor data, unsigned AddressSize) {
+void DWARFDebugLoc::parse(const DWARFDataExtractor &data) {
uint32_t Offset = 0;
- while (data.isValidOffset(Offset+AddressSize-1)) {
+ while (data.isValidOffset(Offset+data.getAddressSize()-1)) {
Locations.resize(Locations.size() + 1);
LocationList &Loc = Locations.back();
Loc.Offset = Offset;
@@ -51,8 +51,8 @@ void DWARFDebugLoc::parse(DataExtractor data, unsigned AddressSize) {
while (true) {
// A beginning and ending address offsets.
Entry E;
- E.Begin = getRelocatedValue(data, AddressSize, &Offset, &RelocMap);
- E.End = getRelocatedValue(data, AddressSize, &Offset, &RelocMap);
+ E.Begin = data.getRelocatedAddress(&Offset);
+ E.End = data.getRelocatedAddress(&Offset);
// The end of any given location list is marked by an end of list entry,
// which consists of a 0 for the beginning address offset and a 0 for the
OpenPOWER on IntegriCloud