================
@@ -657,6 +657,10 @@ def CIR_RecordType : CIR_Type<"Record", "record", [
}
llvm_unreachable("Invalid value for RecordType::getKind()");
}
+ mlir::Type getElementType(size_t idx) {
+ assert(idx < getMembers().size());
----------------
erichkeane wrote:
Assert is a little redundant, as `ArrayRef::operator []` has a similar assert,
but I don't feel strongly either way.
https://github.com/llvm/llvm-project/pull/168646
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits