[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 17:15:04 PDT 2023


================
@@ -396,6 +396,17 @@ void Function::GetDescription(Stream *s, lldb::DescriptionLevel level,
     s->AsRawOstream() << ", name = \"" << name << '"';
   if (mangled)
     s->AsRawOstream() << ", mangled = \"" << mangled << '"';
+  if (level == eDescriptionLevelVerbose) {
+    *s << ", decl_context = {";
+    auto decl_context = GetCompilerContext();
+    // Drop the function itself from the context chain.
+    if (decl_context.size())
+      decl_context.pop_back();
+    llvm::interleave(
----------------
adrian-prantl wrote:

No, it's templated!

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


More information about the lldb-commits mailing list