[PATCH] D34171: Use reference to iterate through string table instead of copying.
Eric Beckmann via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 14:04:39 PDT 2017
ecbeckmann created this revision.
Herald added a subscriber: hiraditya.
just a quick patch
https://reviews.llvm.org/D34171
Files:
llvm/lib/Object/WindowsResource.cpp
Index: llvm/lib/Object/WindowsResource.cpp
===================================================================
--- llvm/lib/Object/WindowsResource.cpp
+++ llvm/lib/Object/WindowsResource.cpp
@@ -690,7 +690,7 @@
void WindowsResourceCOFFWriter::writeDirectoryStringTable() {
// Now write the directory string table for .rsrc$01
uint32_t TotalStringTableSize = 0;
- for (auto String : StringTable) {
+ for (auto &String : StringTable) {
uint16_t Length = String.size();
support::endian::write16le(BufferStart + CurrentOffset, Length);
CurrentOffset += sizeof(uint16_t);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34171.102405.patch
Type: text/x-patch
Size: 591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170613/ece4d27e/attachment.bin>
More information about the llvm-commits
mailing list