diff options
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/MC/WinCOFFObjectWriter.cpp | 2 |
2 files changed, 4 insertions, 4 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); diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp index a76cbdbd544..36b317eebb9 100644 --- a/llvm/lib/MC/WinCOFFObjectWriter.cpp +++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp @@ -924,7 +924,7 @@ void WinCOFFObjectWriter::writeObject(MCAssembler &Asm, if (IsPhysicalSection(Sec)) { // Align the section data to a four byte boundary. - offset = RoundUpToAlignment(offset, 4); + offset = alignTo(offset, 4); Sec->Header.PointerToRawData = offset; offset += Sec->Header.SizeOfRawData; |