From 3421d1ede4c1f4f9cb39d5319482c929c03f62fb Mon Sep 17 00:00:00 2001 From: Sterling Augustine Date: Tue, 28 Apr 2020 15:19:58 -0700 Subject: [PATCH] Make getCompileUnitForAddress public. Summary: Certain dwarf information (like the compilation directory), are only accessible from the compile unit. Make it available for use. Subscribers: aprantl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79048 --- llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h index c448c5f..e58a46b 100644 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h +++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h @@ -394,16 +394,17 @@ public: return getDWARFObj().getFile()->getArch(); } -private: - /// Parse a macro[.dwo] or macinfo[.dwo] section. - std::unique_ptr - parseMacroOrMacinfo(MacroSecType SectionType); - /// Return the compile unit which contains instruction with provided /// address. /// TODO: change input parameter from "uint64_t Address" /// into "SectionedAddress Address" DWARFCompileUnit *getCompileUnitForAddress(uint64_t Address); + +private: + /// Parse a macro[.dwo] or macinfo[.dwo] section. + std::unique_ptr + parseMacroOrMacinfo(MacroSecType SectionType); + void addLocalsForDie(DWARFCompileUnit *CU, DWARFDie Subprogram, DWARFDie Die, std::vector &Result); }; -- 2.7.4