[clang] [CIR] Fix address space of string literals (PR #226996)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 04:00:30 PDT 2026


================
@@ -460,6 +460,13 @@ class CIRGenModule : public CIRGenTypeCache {
   getAddrOfConstantStringFromLiteral(const StringLiteral *s,
                                      llvm::StringRef name = ".str");
 
+  /// Return the AST address space of constant literal, which is used to emit
+  /// the constant literal as global variable in CIR. This is not necessarily
+  /// the address space of the constant literal in AST. For address space
+  /// agnostic language, e.g. C++, constant literal in AST is always in the
+  /// default address space.
----------------
Fznamznon wrote:

That just copies CodeGenUtils, right? Maybe we should instead just say it is a wrapper until SYCL support is in place.

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


More information about the cfe-commits mailing list