Skip to content

Commit 28f70ab

Browse files
committed
always return true for now
1 parent 107930b commit 28f70ab

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

llvm/include/llvm/IR/DataLayout.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,7 @@ class DataLayout {
400400

401401
/// Returns if the null pointer for this address space has an all-zero bit
402402
/// representation.
403-
bool isNullPointerAllZeroes(unsigned AddrSpace) const {
404-
return AddrSpace == 0;
405-
}
403+
bool isNullPointerAllZeroes(unsigned AddrSpace) const { return true; }
406404

407405
/// Returns whether this address space has an "unstable" pointer
408406
/// representation. The bitwise pattern of such pointers is allowed to change

llvm/unittests/IR/DataLayoutTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,11 +702,11 @@ TEST(DataLayout, NonIntegralHelpers) {
702702

703703
TEST(DataLayoutTest, IsNullPointerAllZeroes) {
704704
EXPECT_TRUE(DataLayout("").isNullPointerAllZeroes(0));
705-
EXPECT_FALSE(DataLayout("").isNullPointerAllZeroes(1));
705+
EXPECT_TRUE(DataLayout("").isNullPointerAllZeroes(1));
706706
EXPECT_TRUE(DataLayout("p:32:32").isNullPointerAllZeroes(0));
707-
EXPECT_FALSE(DataLayout("p:32:32").isNullPointerAllZeroes(1));
707+
EXPECT_TRUE(DataLayout("p:32:32").isNullPointerAllZeroes(1));
708708
EXPECT_TRUE(DataLayout("p:64:64").isNullPointerAllZeroes(0));
709-
EXPECT_FALSE(DataLayout("p:64:64").isNullPointerAllZeroes(1));
709+
EXPECT_TRUE(DataLayout("p:64:64").isNullPointerAllZeroes(1));
710710
}
711711

712712
TEST(DataLayoutTest, CopyAssignmentInvalidatesStructLayout) {

0 commit comments

Comments
 (0)