[LLVMdev] Mixing calling conventions

Chris Lattner clattner at apple.com
Wed Dec 17 21:17:06 PST 2008


On Dec 17, 2008, at 9:14 PM, Jon Harrop wrote:

>
> Are you not supposed to be able to call a FastCC function from a CCC  
> function?
>
> I'm calling a CCC "main" function from OCaml and that "main"  
> function calls
> internal functions that require tail calls. With CCC everywhere it  
> works
> (except I don't get tail calls). If I use FastCC on all functions
> except "main" then the function arguments are garbage.
>
> Should I be doing something explicit in order to mix calling  
> conventions?

There is nothing special you need to do.  The only thing to  be  
careful of is that the callee and call instruction must both have the  
same calling convention set on them.

-Chris



More information about the llvm-dev mailing list