From f217ef0d75a4438f610764e582823ffd4807d75d Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 26 Mar 2015 02:03:44 +0000 Subject: Use alignment values everywhere instead of log2. This patch defines implicit conversion between integers and PowerOf2 instances, so uses of the classes is now implicit and look like regular integers. Now we are ready to remove the scaffolding. llvm-svn: 233245 --- lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp') diff --git a/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp b/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp index c705ca6f1be..87c527233cb 100644 --- a/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp +++ b/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp @@ -179,7 +179,7 @@ TEST(BinaryWriterTest, obj_relocs_x86_64) { EXPECT_EQ(S_REGULAR, text.type); EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS | S_ATTR_SOME_INSTRUCTIONS)); - EXPECT_EQ(text.alignment.get(), 16U); + EXPECT_EQ((uint16_t)text.alignment, 16U); EXPECT_EQ(text.address, Hex64(0x0)); EXPECT_EQ(48UL, text.content.size()); const Relocation& call = text.relocations[0]; @@ -290,7 +290,7 @@ TEST(BinaryWriterTest, obj_relocs_x86) { EXPECT_EQ(S_REGULAR, text.type); EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS | S_ATTR_SOME_INSTRUCTIONS)); - EXPECT_EQ(text.alignment.get(), 16U); + EXPECT_EQ((uint16_t)text.alignment, 16U); EXPECT_EQ(text.address, Hex64(0x0)); EXPECT_EQ(22UL, text.content.size()); const Relocation& call = text.relocations[0]; @@ -415,7 +415,7 @@ TEST(BinaryWriterTest, obj_relocs_armv7) { EXPECT_EQ(S_REGULAR, text.type); EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS | S_ATTR_SOME_INSTRUCTIONS)); - EXPECT_EQ(text.alignment.get(), 4U); + EXPECT_EQ((uint16_t)text.alignment, 4U); EXPECT_EQ(text.address, Hex64(0x0)); EXPECT_EQ(18UL, text.content.size()); const Relocation& blx = text.relocations[0]; @@ -571,7 +571,7 @@ TEST(BinaryWriterTest, obj_relocs_ppc) { EXPECT_EQ(S_REGULAR, text.type); EXPECT_EQ(text.attributes,SectionAttr(S_ATTR_PURE_INSTRUCTIONS | S_ATTR_SOME_INSTRUCTIONS)); - EXPECT_EQ(text.alignment.get(), 4U); + EXPECT_EQ((uint16_t)text.alignment, 4U); EXPECT_EQ(text.address, Hex64(0x0)); EXPECT_EQ(44UL, text.content.size()); const Relocation& br24 = text.relocations[0]; -- cgit v1.2.3