[PATCH] D146595: [clang] Add clang trampoline_mangled_target attribute

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 27 11:42:51 PDT 2023


aprantl added a comment.

In D146595#4225048 <https://reviews.llvm.org/D146595#4225048>, @dblaikie wrote:

> I know this is a bit of a redirection/scope creep/etc - but I'd quite like to see a solution that is likely to be usable for the "std::function" problem (stepping into std::function should allow you to reach the underlying function - but lldb currently skips any call to a std-namespaced function, I think, so you step right over the whole op() call) that could also cover the Swift needs. Though perhaps they're just sufficiently different problems that there is no generalizing here.

This patch aims at exposing an existing LLVM IR & DWARF feature in clang. Having a generic solution for the std::function problem is definitely worthwhile investigating, but I'm not sure it needs to prevent supporting the existing mechanism in clang.

I understand that this is nowhere near as flexible as a source-level solution, but in case you weren't aware of this, LLDB implements a custom step through plan for std::function:

https://github.com/llvm/llvm-project/blob/fd059ea7ec044198fd75bb2b3aa30734bcace33e/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp#L368


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146595



More information about the cfe-commits mailing list