diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:01:25 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:01:25 +0000 |
commit | d8e91e46262bc44006913e6796843909f1ac7bcd (patch) | |
tree | 7d0c143d9b38190e0fa0180805389da22cd834c5 /lib/Object/WindowsResource.cpp | |
parent | b7eb8e35e481a74962664b63dfb09483b200209a (diff) |
Notes
Diffstat (limited to 'lib/Object/WindowsResource.cpp')
-rw-r--r-- | lib/Object/WindowsResource.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Object/WindowsResource.cpp b/lib/Object/WindowsResource.cpp index 1b7282f13db0..65413dd8bea1 100644 --- a/lib/Object/WindowsResource.cpp +++ b/lib/Object/WindowsResource.cpp @@ -259,7 +259,7 @@ WindowsResourceParser::TreeNode::addChild(ArrayRef<UTF16> NameRef, std::vector<UTF16> 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<UTF16 *>(BufferStart + CurrentOffset); - std::copy(String.begin(), String.end(), Start); + llvm::copy(String, Start); CurrentOffset += Length * sizeof(UTF16); TotalStringTableSize += Length * sizeof(UTF16) + sizeof(uint16_t); } |