0
在LLVM中,BasicBlock具有属性getSinglePredecessor()和getSingleSuccessor(),但我需要获取整个基本块的后继和前辈列表。我如何在llvm中实现这一点?查找LLVM中基本块的后继列表
我的代码是
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
}
}