llvm::Instruction::replaceSuccessorWith

Replace successor OldBB with NewBB.

Synopsis

Declared in <llvm/IR/Instruction.h>

void
replaceSuccessorWith(
    BasicBlock* OldBB,
    BasicBlock* NewBB);

Description

This instruction must be a terminator.

Parameters

NameDescription
OldBBThe successor block to replace.
NewBBThe block that should replace OldBB.