[llvm-branch-commits] [clang] [CIR] Propagate MemorySpaceAttrInterface for Lang and Target specific AS attributes (PR #179073)
Konstantinos Parasyris via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Feb 1 19:59:59 PST 2026
================
@@ -47,12 +47,19 @@ bool isSized(mlir::Type ty);
cir::LangAddressSpace toCIRLangAddressSpace(clang::LangAS langAS);
-cir::TargetAddressSpaceAttr toCIRTargetAddressSpace(mlir::MLIRContext &context,
- clang::LangAS langAS);
-
-bool isMatchingAddressSpace(cir::TargetAddressSpaceAttr cirAS,
+// Compare a CIR memory space attribute with a Clang LangAS.
+bool isMatchingAddressSpace(mlir::MLIRContext &ctx,
+ mlir::ptr::MemorySpaceAttrInterface cirAS,
clang::LangAS as);
+/// Convert an AST LangAS to the appropriate CIR address space attribute
+/// interface.
+mlir::ptr::MemorySpaceAttrInterface
+toCIRAddressSpaceAttr(mlir::MLIRContext *ctx, clang::LangAS langAS);
----------------
koparasy wrote:
Why pointer `*ctx `here, instead of a reference (and keep partially the previous signature?).
https://github.com/llvm/llvm-project/pull/179073
More information about the llvm-branch-commits
mailing list