================
@@ -4498,6 +4498,9 @@ Address CodeGenFunction::EmitArrayToPointerDecay(const
Expr *E,
if (!E->getType()->isVariableArrayType()) {
assert(isa<llvm::ArrayType>(Addr.getElementType()) &&
"Expected pointer to array");
+
+ if (getLangOpts().HLSL && getLangOpts().EmitStructuredGEP)
+ return Addr;
----------------
Keenuts wrote:
I'm not sure: IIRC point of array-to-pointer decay is to handle an `int[]` into
a `int*`. But in the HLSL/SPIR-V case, if we have a `int[]`, we want to keep an
`int[]`
Keeping the pointer to decay causes issues down the line where we expect an
array type
https://github.com/llvm/llvm-project/pull/177332
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits