diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-12-29 23:01:53 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-30 00:22:23 +0100 |
| commit | b1fb07ddbaa539f9173e32dc27110168b165c1fe (patch) | |
| tree | c78dbe24e774121055411bdb52830fcd105a1c0d /lldb/source/Plugins/SymbolFile | |
| parent | 6991d5728f12594cabfd8d8d570361efb07f1d5a (diff) | |
| download | bcm5719-llvm-b1fb07ddbaa539f9173e32dc27110168b165c1fe.tar.gz bcm5719-llvm-b1fb07ddbaa539f9173e32dc27110168b165c1fe.zip | |
[lldb][NFC] Simplify ClangASTContext::GetTypeForDecl
Also removes the GetASTContext call from this code.
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index e5c37e77194..96dd72bb100 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -255,7 +255,8 @@ TypeSP DWARFASTParserClang::ParseTypeFromClangModule(const SymbolContext &sc, return type_sp; } -static void CompleteExternalTagDeclType(ClangASTImporter &ast_importer, +static void CompleteExternalTagDeclType(ClangASTContext &ast, + ClangASTImporter &ast_importer, clang::DeclContext *decl_ctx, DWARFDIE die, const char *type_name_cstr) { @@ -264,7 +265,7 @@ static void CompleteExternalTagDeclType(ClangASTImporter &ast_importer, return; // If this type was not imported from an external AST, there's nothing to do. - CompilerType type = ClangASTContext::GetTypeForDecl(tag_decl_ctx); + CompilerType type = ast.GetTypeForDecl(tag_decl_ctx); if (!type || !ast_importer.CanImport(type)) return; @@ -1594,7 +1595,7 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc, // backing the Decl is complete before adding children to it. This is // not an issue in the non-gmodules case because the debug info will // always contain a full definition of parent types in that case. - CompleteExternalTagDeclType(GetClangASTImporter(), decl_ctx, die, + CompleteExternalTagDeclType(m_ast, GetClangASTImporter(), decl_ctx, die, attrs.name.GetCString()); if (attrs.accessibility == eAccessNone && decl_ctx) { |

