================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to