[llvm-branch-commits] [clang] [CIR] Upstream `AddressSpace` conversions support (PR #161212)

David Rivera via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Sep 30 13:19:52 PDT 2025


================
@@ -2283,7 +2295,10 @@ Address CIRGenFunction::createTempAlloca(mlir::Type ty, CharUnits align,
   // be different from the type defined by the language. For example,
   // in C++ the auto variables are in the default address space. Therefore
   // cast alloca to the default address space when necessary.
-  assert(!cir::MissingFeatures::addressSpace());
+  if (auto astAS = cir::toCIRAddressSpace(cgm.getLangTempAllocaAddressSpace());
+      getCIRAllocaAddressSpace() != astAS) {
----------------
RiverDave wrote:

I left a comment in place. as you mentioned I'll tackle this soon in a different PR.

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


More information about the llvm-branch-commits mailing list