Nathan =?utf-8?q?Gauër?= <[email protected]>,
Nathan =?utf-8?q?Gauër?= <[email protected]>,
Nathan =?utf-8?q?Gauër?= <[email protected]>,
Nathan =?utf-8?q?Gauër?= <[email protected]>,
Nathan =?utf-8?q?Gauër?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -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;
----------------
efriedma-quic wrote:

The early return here looks suspicious: it skips over the code at the end of 
the function.

Can we just delete the `Addr = Builder.CreateConstArrayGEP(Addr, 0, 
"arraydecay");` line?

https://github.com/llvm/llvm-project/pull/177332
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to