File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -702,11 +702,11 @@ TEST(DataLayout, NonIntegralHelpers) {
702702
703703TEST (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
712712TEST (DataLayoutTest, CopyAssignmentInvalidatesStructLayout) {
You can’t perform that action at this time.
0 commit comments