[LLVMdev] [LLVMDev] [Question] about TerminatorInst

Reid Kleckner reid.kleckner at gmail.com
Thu Sep 2 10:06:52 PDT 2010


Conditional branches have two targets.  Indirect branches presumably
have as many as there are blocks in the function whose addresses are
taken.

Reid

On Thu, Sep 2, 2010 at 12:46 PM, Jeff Kunkel <jdkunk3 at gmail.com> wrote:
> Under what circumstances will a TerminatorInst will have multiple
> successors?
> The three methods:
>   virtual BasicBlock *getSuccessorV(unsigned idx) const = 0;
>   virtual unsigned getNumSuccessorsV() const = 0;
>   virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0;
> are defined for the TerminatorInst class, but I cannot see why a terminator
> is allowed to go to different targets.
> Thanks,
> Jeff Kunkel
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>




More information about the llvm-dev mailing list