[llvm] [DataLayout] Add isNullPointerAllZeroes (PR #165314)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 27 14:11:18 PDT 2025
================
@@ -398,6 +398,12 @@ class DataLayout {
PS.HasExternalState;
}
+ /// Returns if the null pointer for this address space has an all-zero bit
+ /// representation.
+ bool isNullPointerAllZeroes(unsigned AddrSpace) const {
+ return AddrSpace == 0;
+ }
----------------
arichardson wrote:
That said, it probably doesn't matter too much what we use since it will have to change again for #131557 , the main thing I would like to see is avoiding ==0 checks which this patch achieves as is so IMO no need to do something generic.
https://github.com/llvm/llvm-project/pull/165314
More information about the llvm-commits
mailing list