Finding the list of successors of a basic block in LLVM
<p>In LLVM the BasicBlock has the properties getSinglePredecessor() and getSingleSuccessor(), but I need to get the whole list of successors and predecessors of a basic block. How can I achieve this in llvm?</p>

<p>My code is </p>

<pre><code>        virtual bool runOnFunction(Function &amp;F) {

        for (Function::iterator b = F.begin(), be = F.end(); b != be; ++b) { 
        //Here I need to get the predecessor and successsor of the basic block b 
    }
}
</code></pre>