[clang] [Clang] Track alloca element types to avoid getAllocatedType() calls (PR #181740)

Jameson Nash via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 21 11:12:15 PST 2026


================
@@ -992,12 +993,13 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD,
   CI->setCallingConv(Fn->getCallingConv());
 
   if (Fn->getReturnType() != CGM.VoidTy)
-    OutputSemantic.try_emplace(FD, CI);
+    OutputSemantic.try_emplace(FD, std::make_pair(CI, /*unused*/ nullptr));
----------------
vtjnash wrote:

It isn't an element type (it isn't an element), so I'm just letting future readers know that this field is actually and entirely unused in this case

https://github.com/llvm/llvm-project/pull/181740


More information about the cfe-commits mailing list