[PATCH] D144181: [clang][DebugInfo] Add abi-tags on constructors/destructors as LLVM annotations

Michael Buch via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 21 05:11:09 PST 2023


Michael137 added a comment.

> This is what I meant by the "extension for the asm annotation for constructors" part. In principle, we could extend clang so that one can write something like this:

Ah thanks for elaborating. That's an interesting approach. So this would require adding the asm extension to clang, emitting into DWARF some link from subprogram to the various possible linkage names, and then putting it all together in LLDB. I'll have a look at how feasible this might be

> It's definitely contrived, but I think one could write something like this:
> (lldb) expr --top-level class A : public virtual_class_from_DWARF {}
> (lldb) expr A().foo()

Cool, that's pretty neat, thanks. Can confirm that it tries to pick the C2 constructor (and works fine with the proposed patch series); so regardless of where this goes, at the very least got another test-case :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144181/new/

https://reviews.llvm.org/D144181



More information about the cfe-commits mailing list