[MachineVerifier] Use the for_range loop to instead llvm::any_of
Summary: In the patch D78849, it uses llvm::any_of to instead of for loop to simplify the function addRequired(). It's obvious that above code is not a NFC conversion. Because any_of will return if any addRequired(Reg) is true immediately, but we want every element to call addRequired(Reg). This patch uses for_range loop to fix above any_of bug. Reviewed By: MaskRay, nickdesaulniers Differential Revision: https://reviews.llvm.org/D79872
Loading
Please register or sign in to comment