[LLVMdev] CodeGen fails for CallInst with label

Chris Lattner sabre at nondot.org
Sat Apr 19 11:27:23 PDT 2008


On Apr 19, 2008, at 1:30 AM, Edward Lee wrote:
> It seems like LLVM happily creates function calls that pass in labels
> but doesn't know how to emit them.

Yep, this isn't supported.  We can't quite enforce it as invalid at  
this moment, but don't expect it to work.  The only think you can do  
with labels is branch/switch/invoke to them and use them as the block  
operand to phi nodes.

Note that using the address of a label in GCC for anything other than  
an indirect jump is also undefined and doesn't work in general.

-Chris




More information about the llvm-dev mailing list