[llvm] [WIP] Extend data layout to add non zero null value for address space. (PR #83109)

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 08:36:29 PST 2024


================
@@ -299,6 +302,17 @@ class DataLayout {
     return ManglingMode == MM_WinCOFFX86;
   }
 
+  uint64_t getNonZeroValueForAddrSpace(uint64_t AddrSpace) {
+  auto It = AddrSpaceToNonZeroValueMap.find(AddrSpace);
+  if (It == AddrSpaceToNonZeroValueMap.end())
+    return 0x000000000;
----------------
jrtc27 wrote:

Why not just plain 0? But it also seems rather odd to return 0 from a function whose name says NonZeroValue.

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


More information about the llvm-commits mailing list