[PATCH] D61010: [NFC] Instruction: introduce replaceSuccessorWith() function, use it
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 17:09:06 PDT 2019
craig.topper added inline comments.
================
Comment at: lib/IR/Instruction.cpp:679
+void Instruction::replaceSuccessorWith(BasicBlock *OldBB, BasicBlock *NewBB) {
+ for (unsigned idx = 0, NumSuccessors = Instruction::getNumSuccessors();
+ idx != NumSuccessors; ++idx) {
----------------
Capitalize as Idx?
================
Comment at: lib/IR/Instruction.cpp:681
+ idx != NumSuccessors; ++idx) {
+ BasicBlock *CurrSuccessor = getSuccessor(idx);
+ if (CurrSuccessor == OldBB)
----------------
Drop the temporary variable and the curly braces?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61010/new/
https://reviews.llvm.org/D61010
More information about the llvm-commits
mailing list