summaryrefslogtreecommitdiff
path: root/lld/unittests
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-03-26 01:44:01 +0000
committerRui Ueyama <ruiu@google.com>2015-03-26 01:44:01 +0000
commit6b38407989b17e1a544938d3581be879739ff305 (patch)
tree3bc41cf87238c4ec5cf99edd2b9f3b365492e86e /lld/unittests
parentf59287fa26b1cf2fb256ddb91e2c18f48bf6200e (diff)
Define an implicit constructor which takes actual alignment value to PowerOf2.
The new constructor's type is the same, but this one takes not a log2 value but an alignment value itself, so the meaning is totally differnet.
Diffstat (limited to 'lld/unittests')
-rw-r--r--lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp b/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
index d7a032775f5..c705ca6f1be 100644
--- a/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
+++ b/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
@@ -123,7 +123,7 @@ TEST(BinaryWriterTest, obj_relocs_x86_64) {
text.type = S_REGULAR;
text.attributes = SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS);
- text.alignment = lld::PowerOf2::create(4);
+ text.alignment = 16;
text.address = 0;
const uint8_t textBytes[] = {
0xe8, 0x00, 0x00, 0x00, 0x00, 0x48, 0x8b, 0x05,
@@ -240,7 +240,7 @@ TEST(BinaryWriterTest, obj_relocs_x86) {
text.type = S_REGULAR;
text.attributes = SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS);
- text.alignment = lld::PowerOf2::create(4);
+ text.alignment = 16;
text.address = 0;
const uint8_t textBytes[] = {
0xe8, 0xfb, 0xff, 0xff, 0xff, 0xa1, 0x00, 0x00,
@@ -350,7 +350,7 @@ TEST(BinaryWriterTest, obj_relocs_armv7) {
text.type = S_REGULAR;
text.attributes = SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS);
- text.alignment = lld::PowerOf2::create(2);
+ text.alignment = 4;
text.address = 0;
const uint8_t textBytes[] = {
0xff, 0xf7, 0xfe, 0xef, 0x40, 0xf2, 0x05, 0x01,
@@ -479,7 +479,7 @@ TEST(BinaryWriterTest, obj_relocs_ppc) {
text.type = S_REGULAR;
text.attributes = SectionAttr(S_ATTR_PURE_INSTRUCTIONS
| S_ATTR_SOME_INSTRUCTIONS);
- text.alignment = lld::PowerOf2::create(2);
+ text.alignment = 4;
text.address = 0;
const uint8_t textBytes[] = {
0x48, 0x00, 0x00, 0x01, 0x40, 0x82, 0xff, 0xfc,