================
@@ -2648,6 +2648,11 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
assert(!getContext().BuiltinInfo.isImmediate(BuiltinID) &&
"Should not codegen for consteval builtins");
+ // Treat built-in as call to artificial inlined function in debug info.
+ // This enables e.g. profiling tools to annotate time spent in user-called
+ // built-ins with the built-in function name.
+ ApplyBuiltinDebugLocation DebugScope(*this, GD);
----------------
phyBrackets wrote:
I wonder if there is a way to scope this to built-in that actually expand to
calls? Or at least skipping buit-ins that lower to single intrinsic with no
side effects
https://github.com/llvm/llvm-project/pull/189969
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits