[clang] [HLSL] Remove support for constructors for user defined structs (PR #190089)

Sarah Spall via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 13:13:41 PDT 2026


================
@@ -66,6 +66,8 @@ struct UnnamedDerived : UnnamedOnly {};
 // CHECK-LABEL: define hidden void @_Z5case1v(
 // CHECK-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_TWOFLOATS:%.*]]) align 1 [[AGG_RESULT:%.*]]) #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  [[ENTRY:.*:]]
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT]], ptr [[RESULT_PTR]], align 4
----------------
spall wrote:

I believe it is for debugging purposes and is being generated because the sret result is no longer byval due to the lack of constructors.
https://github.com/llvm/llvm-project/commit/7fac5c8d940c91e1e7b8b704186b4649170b029f#diff-9f23818ed51d0b117b5692129d0801721283d0f128a01cbc562353da0266d7ad

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


More information about the cfe-commits mailing list