summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 24aa666fb81..bf0c4b01dc0 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -48,6 +48,7 @@
#include <cstdint>
#include <map>
#include <string>
+#include <tuple>
#include <utility>
#include <vector>
@@ -722,35 +723,6 @@ DWARFCompileUnit *DWARFContext::getCompileUnitForAddress(uint64_t Address) {
return getCompileUnitForOffset(CUOffset);
}
-DWARFContext::DIEsForAddress DWARFContext::getDIEsForAddress(uint64_t Address) {
- DIEsForAddress Result;
-
- DWARFCompileUnit *CU = getCompileUnitForAddress(Address);
- if (!CU)
- return Result;
-
- Result.CompileUnit = CU;
- Result.FunctionDIE = CU->getSubroutineForAddress(Address);
-
- std::vector<DWARFDie> Worklist;
- Worklist.push_back(Result.FunctionDIE);
- while (!Worklist.empty()) {
- DWARFDie DIE = Worklist.back();
- Worklist.pop_back();
-
- if (DIE.getTag() == DW_TAG_lexical_block &&
- DIE.addressRangeContainsAddress(Address)) {
- Result.BlockDIE = DIE;
- break;
- }
-
- for (auto Child : DIE)
- Worklist.push_back(Child);
- }
-
- return Result;
-}
-
static bool getFunctionNameAndStartLineForAddress(DWARFCompileUnit *CU,
uint64_t Address,
FunctionNameKind Kind,
OpenPOWER on IntegriCloud