mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
AttrBuilder::merge/remove - use const& for iterator values in for-range loops.
Noticed by clang-tidy performance-for-range-copy warning.
This commit is contained in:
parent
83b5e8407b
commit
c09fed4566
@ -1706,7 +1706,7 @@ AttrBuilder &AttrBuilder::merge(const AttrBuilder &B) {
|
||||
|
||||
Attrs |= B.Attrs;
|
||||
|
||||
for (auto I : B.td_attrs())
|
||||
for (const auto &I : B.td_attrs())
|
||||
TargetDepAttrs[I.first] = I.second;
|
||||
|
||||
return *this;
|
||||
@ -1737,7 +1737,7 @@ AttrBuilder &AttrBuilder::remove(const AttrBuilder &B) {
|
||||
|
||||
Attrs &= ~B.Attrs;
|
||||
|
||||
for (auto I : B.td_attrs())
|
||||
for (const auto &I : B.td_attrs())
|
||||
TargetDepAttrs.erase(I.first);
|
||||
|
||||
return *this;
|
||||
|
Loading…
Reference in New Issue
Block a user