[clang] [CIR] Upstream `AddressSpace` support for `PointerType` (PR #161028)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 1 15:14:30 PDT 2025


================
@@ -43,6 +44,9 @@ class TargetCIRGenInfo {
   /// Returns ABI info helper for the target.
   const ABIInfo &getABIInfo() const { return *info; }
 
+  /// Get the AST address space for alloca.
+  virtual LangAS getASTAllocaAddressSpace() const { return LangAS::Default; }
----------------
andykaylor wrote:

```suggestion
  virtual cir::TargetAddressSpaceAttr getCIRAllocaAddressSpace() const {
    // Return the default address space
    return cir::TargetAddressSpaceAttr::get(getContext(), getUI32IntegerAttr(0));
  }
```

https://github.com/llvm/llvm-project/pull/161028


More information about the cfe-commits mailing list