summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/File.h
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-03-26 01:12:32 +0000
committerRui Ueyama <ruiu@google.com>2015-03-26 01:12:32 +0000
commitc3d18f512054d8268d1e1a2e5935167cd3db6480 (patch)
treebbba5c909b78c38fc03457bee4e2e3f749662115 /lld/lib/ReaderWriter/MachO/File.h
parent2c6e0597c68c8d51b9fced91803b329a13350e64 (diff)
downloadbcm5719-llvm-c3d18f512054d8268d1e1a2e5935167cd3db6480.tar.gz
bcm5719-llvm-c3d18f512054d8268d1e1a2e5935167cd3db6480.zip
Remove implicit constructor and operator int from PowerOf2.
This patch is to make instantiation and conversion to an integer explicit, so that we can mechanically replace all occurrences of the class with integer in the next step. Now get() returns an alignment value rather than its log2 value. llvm-svn: 233242
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/File.h')
-rw-r--r--lld/lib/ReaderWriter/MachO/File.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/MachO/File.h b/lld/lib/ReaderWriter/MachO/File.h
index 913644ec1fc..4fa1565d41b 100644
--- a/lld/lib/ReaderWriter/MachO/File.h
+++ b/lld/lib/ReaderWriter/MachO/File.h
@@ -44,7 +44,7 @@ public:
}
DefinedAtom::Alignment align(
inSection->alignment,
- sectionOffset % ((uint64_t)1 << inSection->alignment));
+ sectionOffset % inSection->alignment.get());
MachODefinedAtom *atom =
new (allocator()) MachODefinedAtom(*this, name, scope, type, merge,
thumb, noDeadStrip, content, align);
@@ -67,7 +67,7 @@ public:
}
DefinedAtom::Alignment align(
inSection->alignment,
- sectionOffset % ((uint64_t)1 << inSection->alignment));
+ sectionOffset % inSection->alignment.get());
MachODefinedCustomSectionAtom *atom =
new (allocator()) MachODefinedCustomSectionAtom(*this, name, scope, type,
merge, thumb,
@@ -86,7 +86,7 @@ public:
}
DefinedAtom::Alignment align(
inSection->alignment,
- sectionOffset % ((uint64_t)1 << inSection->alignment));
+ sectionOffset % inSection->alignment.get());
MachODefinedAtom *atom =
new (allocator()) MachODefinedAtom(*this, name, scope, size, noDeadStrip,
align);
OpenPOWER on IntegriCloud