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?
My code is
virtual bool runOnFunction(Function &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
}
}