[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
================
@@ -226,32 +228,59 @@ def CIR_PointerType : CIR_Type<"Pointer", "ptr", [
]> {
let summary = "CIR pointer type";
let description = [{
- The `!cir.ptr` type represents C and C++ pointer types and C++ reference
- types, other than pointers-to-members. The `pointee` type is the type
- pointed to.
+ The `!cir.ptr` type is a typed pointer type. It is used to represent
+ pointers to objects in C/C++. The type of the pointed-to object is given by
+ the `pointee` parameter. The `addrSpace` parameter is an optional address
+ space attribute that specifies the address space of the pointer. If not
+ specified, the pointer is assumed to be in the default address space.
- TODO(CIR): The address space attribute is not yet implemented.
+ The `!cir.ptr` type can point to any type, including fundamental types,
+ records, arrays, vectors, functions, and other pointers. It can also point
+ to incomplete types, such as incomplete records.
+
+ Note: Data-member pointers and method pointers are represented by
+ `!cir.data_member` and `!cir.method` types, respectively not by
+ `!cir.ptr` type.
----------------
andykaylor wrote:
This should probably be removed until support for those attributes is upstreamed.
https://github.com/llvm/llvm-project/pull/161028
More information about the cfe-commits
mailing list