================
@@ -1165,7 +1159,14 @@ CIRGenFunction::emitArraySubscriptExpr(const 
clang::ArraySubscriptExpr *e) {
                                  lv.getBaseInfo());
   }
 
-  const mlir::Value idx = emitIdxAfterBase(/*promote=*/true);
+  // The HLSL runtime handles subscript expressions on global resource arrays
+  // and objects with HLSL buffer layouts.
+  if (getLangOpts().HLSL) {
+    cgm.errorNYI(e->getSourceRange(), "emitArraySubscriptExpr: HLSL");
+    return {};
+  }
+
+  mlir::Value idx = emitIdxAfterBase(/*promote=*/true);
----------------
andykaylor wrote:

No, here makes sense. I didn't realize it was used in all of the remaining 
cases, but that appears to be so.

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

Reply via email to