From 23f101f37937a1bd4a29726cab2f76e0fb038b35 Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 23 Jun 2019 21:36:31 +0000 Subject: Import LLVM 8.0.0 release including clang, lld and lldb. --- gnu/llvm/lib/Object/WindowsResource.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gnu/llvm/lib/Object/WindowsResource.cpp') diff --git a/gnu/llvm/lib/Object/WindowsResource.cpp b/gnu/llvm/lib/Object/WindowsResource.cpp index 1b7282f13db..65413dd8bea 100644 --- a/gnu/llvm/lib/Object/WindowsResource.cpp +++ b/gnu/llvm/lib/Object/WindowsResource.cpp @@ -259,7 +259,7 @@ WindowsResourceParser::TreeNode::addChild(ArrayRef NameRef, std::vector EndianCorrectedName; if (sys::IsBigEndianHost) { EndianCorrectedName.resize(NameRef.size() + 1); - std::copy(NameRef.begin(), NameRef.end(), EndianCorrectedName.begin() + 1); + llvm::copy(NameRef, EndianCorrectedName.begin() + 1); EndianCorrectedName[0] = UNI_UTF16_BYTE_ORDER_MARK_SWAPPED; CorrectedName = makeArrayRef(EndianCorrectedName); } else @@ -501,8 +501,7 @@ void WindowsResourceCOFFWriter::writeFirstSection() { void WindowsResourceCOFFWriter::writeSecondSection() { // Now write the .rsrc$02 section. for (auto const &RawDataEntry : Data) { - std::copy(RawDataEntry.begin(), RawDataEntry.end(), - BufferStart + CurrentOffset); + llvm::copy(RawDataEntry, BufferStart + CurrentOffset); CurrentOffset += alignTo(RawDataEntry.size(), sizeof(uint64_t)); } @@ -672,7 +671,7 @@ void WindowsResourceCOFFWriter::writeDirectoryStringTable() { support::endian::write16le(BufferStart + CurrentOffset, Length); CurrentOffset += sizeof(uint16_t); auto *Start = reinterpret_cast(BufferStart + CurrentOffset); - std::copy(String.begin(), String.end(), Start); + llvm::copy(String, Start); CurrentOffset += Length * sizeof(UTF16); TotalStringTableSize += Length * sizeof(UTF16) + sizeof(uint16_t); } -- cgit v1.2.3-59-g8ed1b