[clang] [CIR] Upstream `AddressSpace` support for `PointerType` (PR #161028)
David Rivera via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 30 10:56:44 PDT 2025
================
@@ -35,4 +35,28 @@ class CIR_DefaultValuedEnumParameter<EnumAttrInfo info, string value = "">
let defaultValue = value;
}
+def CIR_AddressSpace : CIR_I32EnumAttr<
+ "AddressSpace", "address space kind", [
+ I32EnumAttrCase<"Default", 0, "default">,
+ I32EnumAttrCase<"OffloadPrivate", 1, "offload_private">,
+ I32EnumAttrCase<"OffloadLocal", 2, "offload_local">,
+ I32EnumAttrCase<"OffloadGlobal", 3, "offload_global">,
+ I32EnumAttrCase<"OffloadConstant", 4, "offload_constant">,
+ I32EnumAttrCase<"OffloadGeneric", 5, "offload_generic">,
+ I32EnumAttrCase<"Target", 6, "target">
+]> {
+ let description = [{
+ The `address_space` attribute is used to represent address spaces for
+ pointer types in CIR. It provides a unified model on top of `clang::LangAS`
+ and simplifies the representation of address spaces.
+
+ The `value` parameter is an extensible enum, which encodes target address
----------------
RiverDave wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/161028
More information about the cfe-commits
mailing list