diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-01-07 22:47:17 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-01-07 22:47:17 +0000 |
commit | bdebef1f84f77061bf4c39cf4038d8de997c9e88 (patch) | |
tree | f5f65c783b3c217dc774b5cad17b474a706a8f00 /lldb | |
parent | c716c6a9712786f5ef9401bb16e4f70141eff1b8 (diff) |
Rename DWARFDIE::GetDWOContext() -> GetDeclContext() (NFC)
Despite the name, this function has nothing to do with the DWO format.
Diffstat (limited to 'lldb')
4 files changed, 8 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 0b71b2a4b87..604db485e57 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -144,7 +144,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWO(const DWARFDIE &die, Log *log) { // This type comes from an external DWO module. std::vector<CompilerContext> dwo_context; - die.GetDWOContext(dwo_context); + die.GetDeclContext(dwo_context); TypeMap dwo_types; if (!dwo_module_sp->GetSymbolVendor()->FindTypes(dwo_context, true, diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp index d9754e91101..22b70b2d685 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp @@ -166,13 +166,13 @@ void DWARFDIE::GetDWARFDeclContext(DWARFDeclContext &dwarf_decl_ctx) const { } } -void DWARFDIE::GetDWOContext(std::vector<CompilerContext> &context) const { +void DWARFDIE::GetDeclContext(std::vector<CompilerContext> &context) const { const dw_tag_t tag = Tag(); if (tag == DW_TAG_compile_unit || tag == DW_TAG_partial_unit) return; DWARFDIE parent = GetParent(); if (parent) - parent.GetDWOContext(context); + parent.GetDeclContext(context); switch (tag) { case DW_TAG_module: context.push_back( diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h index ecbf4912634..b0d06a886ac 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h @@ -90,7 +90,10 @@ public: void GetDWARFDeclContext(DWARFDeclContext &dwarf_decl_ctx) const; - void GetDWOContext(std::vector<lldb_private::CompilerContext> &context) const; + /// Return this DIE's decl context as it is needed to look up types + /// in Clang's -gmodules debug info format. + void + GetDeclContext(std::vector<lldb_private::CompilerContext> &context) const; //---------------------------------------------------------------------- // Getting attribute values from the DIE. diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 9a1fcd280a8..9978369776d 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -2573,7 +2573,7 @@ size_t SymbolFileDWARF::FindTypes(const std::vector<CompilerContext> &context, if (die) { std::vector<CompilerContext> die_context; - die.GetDWOContext(die_context); + die.GetDeclContext(die_context); if (die_context != context) continue; |