diff options
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index 324385fa132..8ebd7031c65 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/lib/MC/MachObjectWriter.cpp @@ -404,7 +404,7 @@ static unsigned ComputeLinkerOptionsLoadCommandSize( unsigned Size = sizeof(MachO::linker_option_command); for (const std::string &Option : Options) Size += Option.size() + 1; - return RoundUpToAlignment(Size, is64Bit ? 8 : 4); + return alignTo(Size, is64Bit ? 8 : 4); } void MachObjectWriter::writeLinkerOptionsLoadCommand( @@ -606,7 +606,7 @@ void MachObjectWriter::computeSectionAddresses(const MCAssembler &Asm, const MCAsmLayout &Layout) { uint64_t StartAddress = 0; for (const MCSection *Sec : Layout.getSectionOrder()) { - StartAddress = RoundUpToAlignment(StartAddress, Sec->getAlignment()); + StartAddress = alignTo(StartAddress, Sec->getAlignment()); SectionAddress[Sec] = StartAddress; StartAddress += Layout.getSectionAddressSize(Sec); @@ -736,7 +736,7 @@ void MachObjectWriter::writeObject(MCAssembler &Asm, // Add the loh load command size, if used. uint64_t LOHRawSize = Asm.getLOHContainer().getEmitSize(*this, Layout); - uint64_t LOHSize = RoundUpToAlignment(LOHRawSize, is64Bit() ? 8 : 4); + uint64_t LOHSize = alignTo(LOHRawSize, is64Bit() ? 8 : 4); if (LOHSize) { ++NumLoadCommands; LoadCommandsSize += sizeof(MachO::linkedit_data_command); |