From 75709329774ba0596bcd99abe4037dacfe28a053 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 17 Nov 2018 01:44:25 +0000 Subject: Use llvm::copy. NFC llvm-svn: 347126 --- llvm/tools/llvm-objcopy/ELF/Object.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/tools') diff --git a/llvm/tools/llvm-objcopy/ELF/Object.cpp b/llvm/tools/llvm-objcopy/ELF/Object.cpp index b9d211b58ec..ae02966b730 100644 --- a/llvm/tools/llvm-objcopy/ELF/Object.cpp +++ b/llvm/tools/llvm-objcopy/ELF/Object.cpp @@ -97,14 +97,14 @@ void SectionWriter::visit(const Section &Sec) { if (Sec.Type == SHT_NOBITS) return; uint8_t *Buf = Out.getBufferStart() + Sec.Offset; - std::copy(std::begin(Sec.Contents), std::end(Sec.Contents), Buf); + llvm::copy(Sec.Contents, Buf); } void Section::accept(SectionVisitor &Visitor) const { Visitor.visit(*this); } void SectionWriter::visit(const OwnedDataSection &Sec) { uint8_t *Buf = Out.getBufferStart() + Sec.Offset; - std::copy(std::begin(Sec.Data), std::end(Sec.Data), Buf); + llvm::copy(Sec.Data, Buf); } static const std::vector ZlibGnuMagic = {'Z', 'L', 'I', 'B'}; @@ -269,7 +269,7 @@ template void ELFSectionWriter::visit(const SectionIndexSection &Sec) { uint8_t *Buf = Out.getBufferStart() + Sec.Offset; auto *IndexesBuffer = reinterpret_cast(Buf); - std::copy(std::begin(Sec.Indexes), std::end(Sec.Indexes), IndexesBuffer); + llvm::copy(Sec.Indexes, IndexesBuffer); } void SectionIndexSection::initialize(SectionTableRef SecTable) { @@ -554,7 +554,7 @@ void RelocationSection::markSymbols() { } void SectionWriter::visit(const DynamicRelocationSection &Sec) { - std::copy(std::begin(Sec.Contents), std::end(Sec.Contents), + llvm::copy(Sec.Contents, Out.getBufferStart() + Sec.Offset); } @@ -641,7 +641,7 @@ void ELFSectionWriter::visit(const GnuDebugLinkSection &Sec) { Elf_Word *CRC = reinterpret_cast(Buf + Sec.Size - sizeof(Elf_Word)); *CRC = Sec.CRC32; - std::copy(std::begin(Sec.FileName), std::end(Sec.FileName), File); + llvm::copy(Sec.FileName, File); } void GnuDebugLinkSection::accept(SectionVisitor &Visitor) const { -- cgit v1.2.3