This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Instruction: introduce replaceSuccessorWith() function, use it
ClosedPublic

Authored by lebedev.ri on Apr 23 2019, 6:28 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

lebedev.ri created this revision.Apr 23 2019, 6:28 AM
craig.topper added inline comments.Apr 23 2019, 10:10 PM
include/llvm/IR/Instruction.h
670

replaceSuccessorWith?

lebedev.ri marked an inline comment as done.
lebedev.ri retitled this revision from [NFC] Instruction: introduce changeSuccessor() function, use it to [NFC] Instruction: introduce replaceSuccessor() function, use it.

Rename to replaceSuccessor().

lebedev.ri retitled this revision from [NFC] Instruction: introduce replaceSuccessor() function, use it to [NFC] Instruction: introduce replaceSuccessorWith() function, use it.
craig.topper added inline comments.Apr 25 2019, 5:06 PM
lib/IR/Instruction.cpp
679

Capitalize as Idx?

681

Drop the temporary variable and the curly braces?

lebedev.ri marked 2 inline comments as done.

Address review notes.

Hm, really drop braces, too.

This revision is now accepted and ready to land.May 5 2019, 10:10 AM
This revision was automatically updated to reflect the committed changes.