How to get the possible predecessors for a PHINode

Hi all,
I have encountered the following instruction:

%.0.i = phi i8* [ %9, %8 ], [ %11, %10 ]

How can I get the %8 and %10?

I’m using as a reference but I cannot understand how to do that.


Use a for-loop. PHINode->getNumIncomingValues() as the loop condition, inside the loop pass the index to PHINode->getIncomingBlock()


Thanks that solved my problem