forked from OSchip/llvm-project
[COFF] Avoid copying of chunk vectors. NFC.
When declaring the pair variable as "auto Pair : Map", it is effectively declared as std::pair<std::pair<StringRef, uint32_t>, std::vector<Chunk *>>. This effectively does a full, shallow copy of the Chunk vector, just to be thrown away after each iteration. Differential Revision: https://reviews.llvm.org/D52051 llvm-svn: 342205
This commit is contained in:
parent
f08a9c700b
commit
4c201a8ba5
|
@ -469,7 +469,7 @@ void Writer::createSections() {
|
|||
// '$' and all following characters in input section names are
|
||||
// discarded when determining output section. So, .text$foo
|
||||
// contributes to .text, for example. See PE/COFF spec 3.2.
|
||||
for (auto Pair : Map) {
|
||||
for (auto &Pair : Map) {
|
||||
StringRef Name = getOutputSectionName(Pair.first.first);
|
||||
uint32_t OutChars = Pair.first.second;
|
||||
|
||||
|
|
Loading…
Reference in New Issue