[Lldb-commits] [lldb] Expose DWARFDIE::GetDeclContext() in lldb_private::Function. (PR #69981)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 23 16:14:45 PDT 2023


================
@@ -519,7 +530,17 @@ CompilerDeclContext Function::GetDeclContext() {
     if (SymbolFile *sym_file = module_sp->GetSymbolFile())
       return sym_file->GetDeclContextForUID(GetID());
   }
-  return CompilerDeclContext();
+  return {};
+}
+
+std::vector<CompilerContext> Function::GetCompilerContext() {
+  ModuleSP module_sp = CalculateSymbolContextModule();
+
+  if (module_sp) {
----------------
bulbazord wrote:

You can roll these into 1 line as well.

https://github.com/llvm/llvm-project/pull/69981


More information about the lldb-commits mailing list