Branch Question

LLVMers,

What is the best way to look at the BBs (or get their pointers) when hitting a branch such as a true/false branch?

I want to evaluate just the immediate child nodes of the BB, without interrupting the way in which I am iterating the blocks?

Thanks.

if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) {
  ...
}

BranchInst provides interface to access successor nodes.