[LLVMdev] Branch Question

Devang Patel dpatel at apple.com
Mon Nov 28 13:56:06 PST 2011

On Nov 28, 2011, at 1:40 PM, Ryan Taylor wrote:

> 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?

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

BranchInst provides interface to access successor nodes.

> Thanks.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

More information about the llvm-dev mailing list