[clang] [clang][DebugInfo] Add inlined subprogram metadata for compiler built-ins (PR #189969)
J. Ryan Stinnett via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 20 03:41:08 PDT 2026
jryans wrote:
> We meet again!
Indeed, hope you are doing well...! :smile:
> In general I like the idea but there's probably a few things we need to work out before we land this. When it's no longer a draft you'll need the code owners of Clang's debug info to look at this. I don't really work on this area of Clang, I'm more of a drive-by contributor so take my comments with a pinch of salt.
Of course...! I've made a number of LLVM / Clang debug info changes in the past. I'll be sure to request the needed reviews once ready.
> A small nit about the PR description.
>
> > This wraps compiler built-ins in an artificial inlined subprogram for debug info purposes.
>
> I think this should be reworded a little as the "purpose" is not the debug info. The purposes is to give debug info consumers more information about builtins. Maybe something like this?
>
> This modifies the debug info for calls to compiler builtins (which were previously where just like any other) to make them appear as if they were inlined from an implementation of the builtin (a subprogram with the name of the builtin). This makes compiler built-in usage legible to debug info consumers like profilers, which can then annotate time spent with the built-in function name. _The rest of your text_
Thanks, I have mostly applied your clarification, expect for the "(which were previously where just like any other)" part, which to me reads as if the built-in calls were previously described in some form. In fact, they actually (in most cases) were not described or mentioned in debug info at all.
https://github.com/llvm/llvm-project/pull/189969
More information about the cfe-commits
mailing list