[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:27 PDT 2025


================
@@ -73,13 +74,17 @@ struct CIRGenTypeCache {
   /// The alignment of size_t.
   unsigned char SizeAlignInBytes;
 
+  LangAS ASTAllocaAddressSpace;
+
   clang::CharUnits getSizeAlign() const {
     return clang::CharUnits::fromQuantity(SizeAlignInBytes);
   }
 
   clang::CharUnits getPointerAlign() const {
     return clang::CharUnits::fromQuantity(PointerAlignInBytes);
   }
+
+  LangAS getASTAllocaAddressSpace() const { return ASTAllocaAddressSpace; }
----------------
andykaylor wrote:

```suggestion
  cir::TargetAddressSpaceAttr getCIRAllocaAddressSpace() const { return cirAllocaAddressSpace; }
```

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


More information about the cfe-commits mailing list