Return the successor index of Succ in BB's terminator.

Synopsis

Declared in <llvm/Analysis/CFG.h>

unsigned int
GetSuccessorNumber(
    BasicBlock const* BB,
    BasicBlock const* Succ);

Description

Search for the specified successor of basic block BB and return its position in the terminator instruction's list of successors. It is an error to call this with a block that is not a successor.

Return Value

Zero‐based index of Succ among BB's terminator successors.

Parameters

Name

Description

BB

Basic block whose terminator successors are searched.

Succ

Successor basic block to locate.

Created with MrDocs