[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:06:18 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL305324: Use reference to iterate through string table instead of copying. (authored by ecbeckmann).

Changed prior to commit:
  https://reviews.llvm.org/D34171?vs=102405&id=102406#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D34171

Files:
  llvm/trunk/lib/Object/WindowsResource.cpp


Index: llvm/trunk/lib/Object/WindowsResource.cpp
===================================================================
--- llvm/trunk/lib/Object/WindowsResource.cpp
+++ llvm/trunk/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.102406.patch
Type: text/x-patch
Size: 609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170613/1da82393/attachment.bin>


More information about the llvm-commits mailing list