aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-20 21:48:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-20 21:48:54 +0000
commit6bc11b14146b9a41402d0348438ff4edb1e344cd (patch)
treea3128f15d970747b64d8aaaa66d9fe8c176bef8a /contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
parent554491ffbdcfe51993d5b436a9bbca7aba388dd3 (diff)
parent583e75cce441388bc562fa225d23499261a0091e (diff)
downloadsrc-6bc11b14146b9a41402d0348438ff4edb1e344cd.tar.gz
src-6bc11b14146b9a41402d0348438ff4edb1e344cd.zip
Notes
Diffstat (limited to 'contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h')
-rw-r--r--contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h b/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
index 40eb4434bd61..023a0f7b9fb2 100644
--- a/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
+++ b/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
@@ -31,6 +31,7 @@
#include <cstdint>
#include <memory>
#include <vector>
+#include <map>
namespace llvm {
@@ -134,6 +135,11 @@ class DWARFUnit {
uint64_t BaseAddr;
// The compile unit debug information entry items.
std::vector<DWARFDebugInfoEntry> DieArray;
+
+ // Map from range's start address to end address and corresponding DIE.
+ // IntervalMap does not support range removal, as a result, we use the
+ // std::map::upper_bound for address range lookup.
+ std::map<uint64_t, std::pair<uint64_t, DWARFDie>> AddrDieMap;
typedef iterator_range<std::vector<DWARFDebugInfoEntry>::iterator>
die_iterator_range;
@@ -183,6 +189,9 @@ public:
AddrOffsetSectionBase = Base;
}
+ // Recursively update address to Die map.
+ void updateAddressDieMap(DWARFDie Die);
+
void setRangesSection(StringRef RS, uint32_t Base) {
RangeSection = RS;
RangeSectionBase = Base;
@@ -339,10 +348,10 @@ private:
/// it was actually constructed.
bool parseDWO();
- /// getSubprogramForAddress - Returns subprogram DIE with address range
+ /// getSubroutineForAddress - Returns subprogram DIE with address range
/// encompassing the provided address. The pointer is alive as long as parsed
/// compile unit DIEs are not cleared.
- DWARFDie getSubprogramForAddress(uint64_t Address);
+ DWARFDie getSubroutineForAddress(uint64_t Address);
};
} // end namespace llvm