================
@@ -326,9 +326,17 @@ Type StructType::parse(mlir::AsmParser &parser) {
is_class, kindsRef);
if (!type)
return {};
- if (auto structTy = mlir::dyn_cast<StructType>(type))
- if (structTy.isIncomplete())
+ if (auto structTy = mlir::dyn_cast<StructType>(type)) {
+ if (structTy.isIncomplete()) {
structTy.complete(membersRef, packed, kindsRef);
+ } else if (structTy.getMembers() != membersRef ||
----------------
steffenlarsen wrote:
I dug a little deeper and it seems like we can just use `mutate`, which has
roughly the same check surface and thus about the same risk, but at least the
risk will be concentrated into the same surface. Additionally, that function
will also do `complete` for us.
https://github.com/llvm/llvm-project/pull/230547
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits