forked from OSchip/llvm-project
RewriteStatepointsForGC - Use const-ref iterator in for-range loops. NFCI.
Avoid unnecessary copies, reported by MSVC static analyzer.
This commit is contained in:
parent
0f83456cf5
commit
f5d23d36de
|
@ -910,7 +910,7 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache) {
|
|||
#ifndef NDEBUG
|
||||
VerifyStates();
|
||||
LLVM_DEBUG(dbgs() << "States after initialization:\n");
|
||||
for (auto Pair : States) {
|
||||
for (const auto &Pair : States) {
|
||||
LLVM_DEBUG(dbgs() << " " << Pair.second << " for " << *Pair.first << "\n");
|
||||
}
|
||||
#endif
|
||||
|
@ -1002,7 +1002,7 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache) {
|
|||
#ifndef NDEBUG
|
||||
VerifyStates();
|
||||
LLVM_DEBUG(dbgs() << "States after meet iteration:\n");
|
||||
for (auto Pair : States) {
|
||||
for (const auto &Pair : States) {
|
||||
LLVM_DEBUG(dbgs() << " " << Pair.second << " for " << *Pair.first << "\n");
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue