the object in a moved-from state, and its simpler to write the code that
way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226589
91177308-0d34-0410-b5e6-
96231b3b80d8
Arg.TopLevelLoops.clear();
}
LoopInfoBase &operator=(LoopInfoBase &&RHS) {
- if (&RHS != this) {
- BBMap = std::move(RHS.BBMap);
+ BBMap = std::move(RHS.BBMap);
- for (auto *L : TopLevelLoops)
- delete L;
- TopLevelLoops = std::move(RHS.TopLevelLoops);
- RHS.TopLevelLoops.clear();
- }
+ for (auto *L : TopLevelLoops)
+ delete L;
+ TopLevelLoops = std::move(RHS.TopLevelLoops);
+ RHS.TopLevelLoops.clear();
return *this;
}