[LLVMdev] SwitchInst::addCase with BlockAddress
Carlo Alberto Ferraris
cafxx at strayorange.com
Sun Jul 31 23:03:20 PDT 2011
Nella citazione domenica 31 luglio 2011 16:36:14, Carlo Alberto
Ferraris ha scritto:
> I'm trying to figure out how to feed a blockaddress to a switch
> condition AND destination (basically emulating an indirectbr via a
> switch; I know it's not a good approach, I'm just experimenting).
Basically the question boils down to: how do I get a ConstantInt out of
a BlockAddress? I was able to get a ConstantExpr via
ConstantExpr::getPointerCast but now I don't know how to get a
ConstantInt out of a ConstantExpr...
Carlo Alberto Ferraris <cafxx at strayorange.com
<mailto:cafxx at strayorange.com>>
website/blog <http://cafxx.strayorange.com> - +39 333 7643 235
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 233 bytes
Desc: not available
More information about the llvm-dev