From: Sterling Augustine Date: Tue, 28 Apr 2020 22:19:58 +0000 (-0700) Subject: Make getCompileUnitForAddress public. X-Git-Tag: llvmorg-12-init~7526 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3421d1ede4c1f4f9cb39d5319482c929c03f62fb;p=platform%2Fupstream%2Fllvm.git 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 --- 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); };