[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
Thu May 7 07:31:20 PDT 2026
================
@@ -2642,12 +2642,80 @@ static RValue EmitHipStdParUnsupportedBuiltin(CodeGenFunction *CGF,
return RValue::get(CGF->Builder.CreateCall(UBF, Args));
}
+/// Determines whether we should treat a given built-in as a call to an
+/// artificial inlined function in debug info.
+static bool shouldUseBuiltinDebugLocation(unsigned BuiltinID) {
----------------
jryans wrote:
I took another look at this... I currently remain convinced that it is easier for myself (and hopefully other readers also) to follow the exceptions list in its current `switch` statement form. It's easier to see the several classes of exceptions that way, and also easier to add comments explaining the reasoning for each. (There are many other parts of Clang that switch on builtin ID in a similar manner, so it doesn't feel too out of place in my opinion.)
Of course, if someone does feel strongly that it really should be in `Builtins.td`, we can still explore that.
https://github.com/llvm/llvm-project/pull/189969
More information about the cfe-commits
mailing list