diff options
| author | Craig Topper <craig.topper@gmail.com> | 2014-06-08 22:29:17 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2014-06-08 22:29:17 +0000 |
| commit | 66f09ad0417c0e9f0c959023c1cdfcf2d881ad2e (patch) | |
| tree | b9db3c4a6ee223002b945659169ab39cdd9fd80d /llvm/unittests/ExecutionEngine/MCJIT/MCJITMemoryManagerTest.cpp | |
| parent | 41181d140c99913f8c8d73791dd4babfcba8a73d (diff) | |
| download | llvm-66f09ad0417c0e9f0c959023c1cdfcf2d881ad2e.zip llvm-66f09ad0417c0e9f0c959023c1cdfcf2d881ad2e.tar.gz llvm-66f09ad0417c0e9f0c959023c1cdfcf2d881ad2e.tar.bz2 | |
[C++11] Use 'nullptr'.
llvm-svn: 210442
Diffstat (limited to 'llvm/unittests/ExecutionEngine/MCJIT/MCJITMemoryManagerTest.cpp')
| -rw-r--r-- | llvm/unittests/ExecutionEngine/MCJIT/MCJITMemoryManagerTest.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/unittests/ExecutionEngine/MCJIT/MCJITMemoryManagerTest.cpp b/llvm/unittests/ExecutionEngine/MCJIT/MCJITMemoryManagerTest.cpp index f862999..98587f7 100644 --- a/llvm/unittests/ExecutionEngine/MCJIT/MCJITMemoryManagerTest.cpp +++ b/llvm/unittests/ExecutionEngine/MCJIT/MCJITMemoryManagerTest.cpp @@ -23,10 +23,10 @@ TEST(MCJITMemoryManagerTest, BasicAllocations) { uint8_t *code2 = MemMgr->allocateCodeSection(256, 0, 3, ""); uint8_t *data2 = MemMgr->allocateDataSection(256, 0, 4, "", false); - EXPECT_NE((uint8_t*)0, code1); - EXPECT_NE((uint8_t*)0, code2); - EXPECT_NE((uint8_t*)0, data1); - EXPECT_NE((uint8_t*)0, data2); + EXPECT_NE((uint8_t*)nullptr, code1); + EXPECT_NE((uint8_t*)nullptr, code2); + EXPECT_NE((uint8_t*)nullptr, data1); + EXPECT_NE((uint8_t*)nullptr, data2); // Initialize the data for (unsigned i = 0; i < 256; ++i) { @@ -56,10 +56,10 @@ TEST(MCJITMemoryManagerTest, LargeAllocations) { uint8_t *code2 = MemMgr->allocateCodeSection(0x100000, 0, 3, ""); uint8_t *data2 = MemMgr->allocateDataSection(0x100000, 0, 4, "", false); - EXPECT_NE((uint8_t*)0, code1); - EXPECT_NE((uint8_t*)0, code2); - EXPECT_NE((uint8_t*)0, data1); - EXPECT_NE((uint8_t*)0, data2); + EXPECT_NE((uint8_t*)nullptr, code1); + EXPECT_NE((uint8_t*)nullptr, code2); + EXPECT_NE((uint8_t*)nullptr, data1); + EXPECT_NE((uint8_t*)nullptr, data2); // Initialize the data for (unsigned i = 0; i < 0x100000; ++i) { @@ -98,8 +98,8 @@ TEST(MCJITMemoryManagerTest, ManyAllocations) { data[i][j] = 2 + (i % 254); } - EXPECT_NE((uint8_t *)0, code[i]); - EXPECT_NE((uint8_t *)0, data[i]); + EXPECT_NE((uint8_t *)nullptr, code[i]); + EXPECT_NE((uint8_t *)nullptr, data[i]); } // Verify the data (this is checking for overlaps in the addresses) @@ -141,8 +141,8 @@ TEST(MCJITMemoryManagerTest, ManyVariedAllocations) { data[i][j] = 2 + (i % 254); } - EXPECT_NE((uint8_t *)0, code[i]); - EXPECT_NE((uint8_t *)0, data[i]); + EXPECT_NE((uint8_t *)nullptr, code[i]); + EXPECT_NE((uint8_t *)nullptr, data[i]); uintptr_t CodeAlign = Align ? (uintptr_t)code[i] % Align : 0; uintptr_t DataAlign = Align ? (uintptr_t)data[i] % Align : 0; |
