[llvm-branch-commits] [clang] [NFCI][clang] Allow overriding any global variable address space (PR #195612)
Pierre van Houtryve via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jun 12 04:24:16 PDT 2026
Pierre-vh wrote:
> > I'm a little confused why want to do adjustments like this in CodeGen; shouldn't Sema know the address-space of variables?
>
> I think it needs to be tracked in sema because of `constexpr` (which can happen at compile time or runtime) and AST matchers, etc.
To be clear, this patch just aims to adjust the emitted AS, not the user-facing AS (which remains `__shared__` for the time being). Does Sema need to be aware of the AS used by the IR at any point ? If so I'll of course look into fixing it, I just didn't think it was the case when I made this. I followed the breadcrumbs of how we do it for other similar cases and built from there
https://github.com/llvm/llvm-project/pull/195612
More information about the llvm-branch-commits
mailing list