Skip to content

Commit

Permalink
[NFC] Fix compiler warnings
Browse files Browse the repository at this point in the history
Fix warnings caused by -Wrange-loop-analysis.

Patch by Xiaoqing Wu <xiaoqing_wu@apple.com>

Differential Revision: https://reviews.llvm.org/D98298
  • Loading branch information
Quentin Colombet committed Mar 10, 2021
1 parent 77a9d15 commit 66dab2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions llvm/include/llvm/CodeGen/WasmEHFuncInfo.h
Expand Up @@ -44,7 +44,7 @@ struct WasmEHFuncInfo {
assert(hasUnwindSrcs(BB));
const auto &Set = UnwindDestToSrcs.lookup(BB);
SmallPtrSet<const BasicBlock *, 4> Ret;
for (const auto &P : Set)
for (const auto P : Set)
Ret.insert(P.get<const BasicBlock *>());
return Ret;
}
Expand All @@ -70,7 +70,7 @@ struct WasmEHFuncInfo {
assert(hasUnwindSrcs(MBB));
const auto &Set = UnwindDestToSrcs.lookup(MBB);
SmallPtrSet<MachineBasicBlock *, 4> Ret;
for (const auto &P : Set)
for (const auto P : Set)
Ret.insert(P.get<MachineBasicBlock *>());
return Ret;
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Expand Up @@ -345,7 +345,7 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
for (auto &KV : EHInfo.UnwindDestToSrcs) {
const auto *Dest = KV.first.get<const BasicBlock *>();
UnwindDestToSrcs[MBBMap[Dest]] = SmallPtrSet<BBOrMBB, 4>();
for (const auto &P : KV.second)
for (const auto P : KV.second)
UnwindDestToSrcs[MBBMap[Dest]].insert(
MBBMap[P.get<const BasicBlock *>()]);
}
Expand Down

0 comments on commit 66dab2f

Please sign in to comment.