================
@@ -175,7 +183,8 @@ uint64_t
CIRGenBuilderTy::computeOffsetFromGlobalViewIndices(
ty = arrayTy.getElementType();
offset += layout.getTypeAllocSize(ty) * idx;
} else {
- llvm_unreachable("unexpected type");
+ // Scalar or pointer type: the index is a flat element count.
----------------
adams381 wrote:
Switched to `else if (mlir::isa<cir::IntType>(ty))` with the `llvm_unreachable`
retained for unexpected types. Same reasoning as the forward function — the
only non-aggregate type that reaches the navigator is the integer element of a
string-literal GlobalViewAttr.
https://github.com/llvm/llvm-project/pull/201705
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits