[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 23 16:38:36 PDT 2023
================
@@ -142,8 +142,7 @@ TypeSP DWARFASTParserClang::ParseTypeFromClangModule(const SymbolContext &sc,
// If this type comes from a Clang module, recursively look in the
// DWARF section of the .pcm file in the module cache. Clang
// generates DWO skeleton units as breadcrumbs to find them.
- llvm::SmallVector<CompilerContext, 4> decl_context;
- die.GetDeclContext(decl_context);
+ std::vector<CompilerContext> decl_context = die.GetDeclContext();
----------------
adrian-prantl wrote:
This was purely an aesthetic choice. I felt like hardcoding the constant 4 makes a choice for something that's hugely language-dependent in a general API, and given that this is parsing DWARF the extra malloc overhead of std::vector likely does not matter in the slightest.
https://github.com/llvm/llvm-project/pull/69981
More information about the lldb-commits
mailing list