TerminatorInst and changing successor

Hi,

Is changing the successors for each basic blocks means by default that the Terminator Instruction will be changed or this is another problem should be solved?

If case 2 please tell me how to change it according to the new successors?

Thanks

Hi Rasha,

Is changing the successors for each basic blocks means by default that the
Terminator Instruction will be changed or this is another problem should be
solved?

I think the only way you *can* change a basic block's successors is by
changing its terminator instruction, so "by default" is the closest
answer. Though you should make sure your basic block only has one
terminator afterwards, otherwise the IR is invalid. I'm sure LLVM will
complain at you if you forget that though.

Cheers.

Tim.

Thank you Tim

i solved the problem