[clang] [CIR] Address Space support for GlobalOps (PR #179082)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 15:01:51 PDT 2026


================
@@ -2488,8 +2488,10 @@ void CIRToLLVMGlobalOpLowering::setupRegionInitializedLLVMGlobalOp(
   //        in CIRToLLVMGlobalOpLowering::matchAndRewrite() but that will go
   //        away when the placeholders are no longer needed.
   const bool isConst = op.getConstant();
-  assert(!cir::MissingFeatures::addressSpace());
-  const unsigned addrSpace = 0;
+  unsigned addrSpace = 0;
+  if (auto targetAS = mlir::dyn_cast_if_present<cir::TargetAddressSpaceAttr>(
----------------
andykaylor wrote:

What happens here if the global op uses a language address space?

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


More information about the cfe-commits mailing list