Skip to content

Commit

Permalink
Use reference to iterate through string table instead of copying.
Browse files Browse the repository at this point in the history
Summary: just a quick patch

Subscribers: ruiu, llvm-commits, hiraditya

Differential Revision: https://reviews.llvm.org/D34171

llvm-svn: 305324
  • Loading branch information
Eric Beckmann committed Jun 13, 2017
1 parent dece280 commit 0096d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Object/WindowsResource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0096d78

Please sign in to comment.