[clang] [compiler-rt] [clang][DebugInfo] Add inlined subprogram metadata for compiler built-ins (PR #189969)
J. Ryan Stinnett via cfe-commits
cfe-commits at lists.llvm.org
Fri May 8 04:42:48 PDT 2026
================
@@ -5134,6 +5147,15 @@ void CGDebugInfo::EmitInlineFunctionEnd(CGBuilderTy &Builder) {
setInlinedAt(llvm::DebugLoc(CurInlinedAt).getInlinedAt());
}
+llvm::DILocation *
+CGDebugInfo::createBuiltinFunctionLocation(CGBuilderTy &Builder,
+ GlobalDecl GD) {
+ const auto *FD = cast<FunctionDecl>(GD.getDecl());
+ const auto Location = Builder.getCurrentDebugLocation();
+ return CreateSyntheticInlineAt(Location, getFunctionName(FD),
----------------
jryans wrote:
Ah okay, I can see how that might ease things for some tools, but I am not sure that there's a single file that would make sense to use as the invented location of all possible built-ins... I could perhaps use `clang/lib/CodeGen/CGBuiltin.cpp` as the file, since that's the main file responsible for Clang's built-in code emission...?
How does that sound? Is there a different file you'd prefer?
https://github.com/llvm/llvm-project/pull/189969
More information about the cfe-commits
mailing list