diff options
author | Fangrui Song <maskray@google.com> | 2018-11-17 01:44:25 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-11-17 01:44:25 +0000 |
commit | 75709329774ba0596bcd99abe4037dacfe28a053 (patch) | |
tree | ec75e41ad7e05d81e381911b019f605d019ff5fe /llvm/lib/Object/WindowsResource.cpp | |
parent | a900471d58fda9c5c68b0177b912a3ea174b5d18 (diff) | |
download | bcm5719-llvm-75709329774ba0596bcd99abe4037dacfe28a053.tar.gz bcm5719-llvm-75709329774ba0596bcd99abe4037dacfe28a053.zip |
Use llvm::copy. NFC
llvm-svn: 347126
Diffstat (limited to 'llvm/lib/Object/WindowsResource.cpp')
-rw-r--r-- | llvm/lib/Object/WindowsResource.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Object/WindowsResource.cpp b/llvm/lib/Object/WindowsResource.cpp index 1b7282f13db..65413dd8bea 100644 --- a/llvm/lib/Object/WindowsResource.cpp +++ b/llvm/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); } |