[clang] [Clang][HLSL] Start emitting structured GEP instruction (PR #177332)

Steven Perron via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 26 07:05:32 PST 2026


Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/177332 at github.com>


================
@@ -4548,10 +4554,18 @@ static llvm::Value *emitArraySubscriptGEP(CodeGenFunction &CGF,
 
 static Address emitArraySubscriptGEP(CodeGenFunction &CGF, Address addr,
                                      ArrayRef<llvm::Value *> indices,
+                                     llvm::Type *arrayType,
----------------
s-perron wrote:

I don't know what is standard clang practice.

You have an optional parameter (it could be null) early in the parameter list. Should you follow 

https://github.com/llvm/llvm-project/pull/177332/changes#diff-09a56362f11b1d6447e14a762cd294e32c308ada102b6993fb968f14de8906c4R4656

Put is later in the list, and possibly add a default value for it.

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


More information about the cfe-commits mailing list