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
This commit is contained in:
Sterling Augustine 2020-04-28 15:19:58 -07:00
parent 35edd704e0
commit 3421d1ede4
1 changed files with 6 additions and 5 deletions

View File

@ -394,16 +394,17 @@ public:
return getDWARFObj().getFile()->getArch();
}
private:
/// Parse a macro[.dwo] or macinfo[.dwo] section.
std::unique_ptr<DWARFDebugMacro>
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<DWARFDebugMacro>
parseMacroOrMacinfo(MacroSecType SectionType);
void addLocalsForDie(DWARFCompileUnit *CU, DWARFDie Subprogram, DWARFDie Die,
std::vector<DILocal> &Result);
};