[llvm] [WIP] Extend data layout to add non zero null value for address space. (PR #83109)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 1 03:02:04 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;
+ return AddrSpaceToNonZeroValueMap[AddrSpace];
+ }
+
+ void setNonZeroValueForAddrSpace(uint64_t AddrSpace, uint64_t Value) {
----------------
Pierre-vh wrote:
ditto, use something like `setNullPointerValue`
https://github.com/llvm/llvm-project/pull/83109
More information about the llvm-commits
mailing list