[clang] [clang] model WASM alloca addrspaces in Sema (PR #197540)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 9 01:52:41 PDT 2026
================
@@ -218,7 +226,11 @@ void AMDGPUTargetInfo::fillValidCPUList(
}
void AMDGPUTargetInfo::setAddressSpaceMap(bool DefaultIsPrivate) {
- AddrSpaceMap = DefaultIsPrivate ? &AMDGPUDefIsPrivMap : &AMDGPUDefIsGenMap;
+ // Use separate assignments so the compiler will enforce the size is correct.
+ if (DefaultIsPrivate)
+ AddrSpaceMap = &AMDGPUDefIsPrivMap;
+ else
+ AddrSpaceMap = &AMDGPUDefIsGenMap;
----------------
arsenm wrote:
Can you delete the DefaultIsPrivate case now?
https://github.com/llvm/llvm-project/pull/197540
More information about the cfe-commits
mailing list