[LLVMdev] callinst vs. invokeinst

Chris Lattner sabre at nondot.org
Mon Oct 30 18:13:05 PST 2006


On Mon, 30 Oct 2006, Ryan M. Lefever wrote:
> What is the difference between a CallInst and an InvokeInst in LLVM?  Is
> an InvokeInst a CallInst that can throw an exception?

They both allow the callee to throw an exception.  Invoke is used when a 
callee is calling a function and wants to stop unwinding if it throws.

Some references:

http://llvm.org/docs/LangRef.html#i_invoke
http://llvm.org/pubs/2004-01-30-CGO-LLVM.html

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list