summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
index 0f8bba49eaa..5d851898fc5 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
@@ -291,7 +291,7 @@ MachOFileLayout::MachOFileLayout(const NormalizedFile &file)
uint64_t offset = _startOfSectionsContent;
for (const Section &sect : file.sections) {
if (sect.type != llvm::MachO::S_ZEROFILL) {
- offset = llvm::RoundUpToAlignment(offset, sect.alignment.get());
+ offset = llvm::RoundUpToAlignment(offset, sect.alignment);
_sectInfo[&sect].fileOffset = offset;
offset += sect.content.size();
} else {
@@ -613,7 +613,7 @@ std::error_code MachOFileLayout::writeSingleSegmentLoadCommand(uint8_t *&lc) {
sout->addr = sin.address;
sout->size = sin.content.size();
sout->offset = _sectInfo[&sin].fileOffset;
- sout->align = llvm::Log2_32(sin.alignment.get());
+ sout->align = llvm::Log2_32(sin.alignment);
sout->reloff = sin.relocations.empty() ? 0 : relOffset;
sout->nreloc = sin.relocations.size();
sout->flags = sin.type | sin.attributes;
@@ -661,7 +661,7 @@ std::error_code MachOFileLayout::writeSegmentLoadCommands(uint8_t *&lc) {
sect->offset = 0;
else
sect->offset = section->address - seg.address + segInfo.fileOffset;
- sect->align = llvm::Log2_32(section->alignment.get());
+ sect->align = llvm::Log2_32(section->alignment);
sect->reloff = 0;
sect->nreloc = 0;
sect->flags = section->type | section->attributes;
OpenPOWER on IntegriCloud