================
@@ -107,15 +159,28 @@ static mlir::Type abiTypeToCIR(const llvm::abi::Type *ty,
MLIRContext *ctx) {
.Case([&](const llvm::abi::PointerType *) {
return cir::PointerType::get(cir::VoidType::get(ctx));
})
+ .Case([&](const llvm::abi::RecordType *recTy) -> mlir::Type {
+ SmallVector<mlir::Type> fieldTypes;
+ fieldTypes.reserve(recTy->getFields().size());
+ for (const auto &field : recTy->getFields()) {
+ mlir::Type fieldCIR = abiTypeToCIR(field.FieldType, ctx);
+ if (!fieldCIR)
+ return nullptr;
+ fieldTypes.push_back(fieldCIR);
+ }
+ return cir::StructType::get(ctx, fieldTypes, /*packed=*/false,
+ /*padded=*/false, /*is_class=*/false);
----------------
erichkeane wrote:
what is our 'source' of the 'false' fields here? SHOULD we be copying
packed/padded/class from the original type?
https://github.com/llvm/llvm-project/pull/210528
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits