diff options
author | Eric Beckmann <ecbeckmann@google.com> | 2017-06-13 21:05:42 +0000 |
---|---|---|
committer | Eric Beckmann <ecbeckmann@google.com> | 2017-06-13 21:05:42 +0000 |
commit | 9e05a2d6d02c08c3f9f09fb53ce441600b739aec (patch) | |
tree | 76c8ada0a8d16f97119ab4eafe7c9f723408f006 /lib/Object | |
parent | 10b776df22185f15cc99a037bbe0802d8839bae0 (diff) |
Use reference to iterate through string table instead of copying.
Summary: just a quick patch
Subscribers: ruiu, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D34171
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r-- | lib/Object/WindowsResource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Object/WindowsResource.cpp b/lib/Object/WindowsResource.cpp index a1a0d96acbc0..3f6080d48f9d 100644 --- a/lib/Object/WindowsResource.cpp +++ b/lib/Object/WindowsResource.cpp @@ -690,7 +690,7 @@ void WindowsResourceCOFFWriter::writeDirectoryTree() { 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); |