[llvm] r185443 - Fix -Wsign-compare warning and remove windows-style line endings introduced by r185421
David Blaikie
dblaikie at gmail.com
Tue Jul 2 09:48:10 PDT 2013
Author: dblaikie
Date: Tue Jul 2 11:48:10 2013
New Revision: 185443
URL: http://llvm.org/viewvc/llvm-project?rev=185443&view=rev
Log:
Fix -Wsign-compare warning and remove windows-style line endings introduced by r185421
Modified:
llvm/trunk/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp?rev=185443&r1=185442&r2=185443&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp Tue Jul 2 11:48:10 2013
@@ -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);
}
}
More information about the llvm-commits
mailing list