diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-07-02 16:48:10 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-07-02 16:48:10 +0000 |
commit | 5186591cf5076b87a8a7114016f029f1a3efca93 (patch) | |
tree | 8eaff3bcdeae73ed38586e3d6fcd38719603fa6f /unittests | |
parent | c93bee09ac0ebfad4efd7a7d195ce586d9ad50ed (diff) | |
download | llvm-5186591cf5076b87a8a7114016f029f1a3efca93.tar.gz llvm-5186591cf5076b87a8a7114016f029f1a3efca93.tar.bz2 llvm-5186591cf5076b87a8a7114016f029f1a3efca93.tar.xz |
Fix -Wsign-compare warning and remove windows-style line endings introduced by r185421
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185443 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp b/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp index c06b89cf43..68ca53d4e6 100644 --- a/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp +++ b/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp @@ -281,23 +281,23 @@ TEST(JITMemoryManagerTest, TestManyStubs) { TEST(JITMemoryManagerTest, AllocateSection) { OwningPtr<JITMemoryManager> MemMgr( JITMemoryManager::CreateDefaultMemManager()); - uint8_t *code1 = MemMgr->allocateCodeSection(256, 0, 1);
- uint8_t *data1 = MemMgr->allocateDataSection(256, 16, 2, true);
- uint8_t *code2 = MemMgr->allocateCodeSection(257, 32, 3);
- uint8_t *data2 = MemMgr->allocateDataSection(256, 64, 4, false);
- uint8_t *code3 = MemMgr->allocateCodeSection(258, 64, 5);
-
- EXPECT_NE((uint8_t*)0, code1);
- EXPECT_NE((uint8_t*)0, code2);
- EXPECT_NE((uint8_t*)0, data1);
- EXPECT_NE((uint8_t*)0, data2);
-
- // Check alignment
- EXPECT_EQ((uint64_t)code1 & 0xf, 0);
- EXPECT_EQ((uint64_t)code2 & 0x1f, 0);
- EXPECT_EQ((uint64_t)code3 & 0x3f, 0);
- EXPECT_EQ((uint64_t)data1 & 0xf, 0);
- EXPECT_EQ((uint64_t)data2 & 0x3f, 0);
+ uint8_t *code1 = MemMgr->allocateCodeSection(256, 0, 1); + uint8_t *data1 = MemMgr->allocateDataSection(256, 16, 2, true); + uint8_t *code2 = MemMgr->allocateCodeSection(257, 32, 3); + uint8_t *data2 = MemMgr->allocateDataSection(256, 64, 4, false); + uint8_t *code3 = MemMgr->allocateCodeSection(258, 64, 5); + + EXPECT_NE((uint8_t*)0, code1); + EXPECT_NE((uint8_t*)0, code2); + EXPECT_NE((uint8_t*)0, data1); + EXPECT_NE((uint8_t*)0, data2); + + // Check alignment + EXPECT_EQ((uint64_t)code1 & 0xf, 0u); + EXPECT_EQ((uint64_t)code2 & 0x1f, 0u); + EXPECT_EQ((uint64_t)code3 & 0x3f, 0u); + EXPECT_EQ((uint64_t)data1 & 0xf, 0u); + EXPECT_EQ((uint64_t)data2 & 0x3f, 0u); } } |