================
@@ -379,8 +379,11 @@ static mlir::Type abiTypeToCIR(const llvm::abi::Type *ty,
MLIRContext *ctx) {
.Case([&](const llvm::abi::FloatType *fltTy) {
return cir::getFloatingPointType(*fltTy->getSemantics(), ctx);
})
- .Case([&](const llvm::abi::PointerType *) {
- return cir::PointerType::get(cir::VoidType::get(ctx));
+ .Case([&](const llvm::abi::PointerType *ptrTy) {
+ mlir::ptr::MemorySpaceAttrInterface addrSpace;
+ if (unsigned as = ptrTy->getAddrSpace())
+ addrSpace = cir::TargetAddressSpaceAttr::get(ctx, as);
+ return cir::PointerType::get(cir::VoidType::get(ctx), addrSpace);
----------------
skc7 wrote:
Checked this and this change fails the build. There's no `PointerType` builder
that takes an unsigned.
https://github.com/llvm/llvm-project/pull/220197
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits