================
@@ -2308,11 +2309,8 @@ mlir::LogicalResult 
CIRToLLVMSelectOpLowering::matchAndRewrite(
 static void prepareTypeConverter(mlir::LLVMTypeConverter &converter,
                                  mlir::DataLayout &dataLayout) {
   converter.addConversion([&](cir::PointerType type) -> mlir::Type {
-    // Drop pointee type since LLVM dialect only allows opaque pointers.
-    assert(!cir::MissingFeatures::addressSpace());
-    unsigned targetAS = 0;
-
-    return mlir::LLVM::LLVMPointerType::get(type.getContext(), targetAS);
+    unsigned addrSpace = cir::getTargetAddrSpaceFromAttr(type.getAddrSpace());
----------------
andykaylor wrote:

```suggestion
    unsigned addrSpace = type.getAddrSpace() ? type.getAddrSpace().getUInt() : 
0;
```

https://github.com/llvm/llvm-project/pull/161028
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to