[clang] [CIR][SPIR-V] Use the program address space for global ctors and dtors (PR #233927)

Arseniy Obolenskiy via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 20 21:12:03 PDT 2026


================
@@ -4409,7 +4409,9 @@ static void buildCtorDtorList(
 
   // Create a global array llvm.global_ctors with element type of
   // struct { i32, ptr, ptr }
-  auto ctorPFTy = mlir::LLVM::LLVMPointerType::get(builder.getContext());
+  cir::CIRDataLayout cirDataLayout(module);
+  auto ctorPFTy = mlir::LLVM::LLVMPointerType::get(
----------------
aobolensk wrote:

If we want to change that I can address that as a follow up

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


More information about the cfe-commits mailing list