[LLVMdev] Switch + Addresses of functions
Duncan Sands
baldrick at free.fr
Thu Apr 19 03:43:58 PDT 2012
Hi Михаил,
> Is it possible to use address of function in case block of switch instruction?
no.
I
> understand that it should be constants only
They have to be simple numbers.
, but in llvm reference i founded
> that: "The addresses of global variables
> <http://llvm.org/docs/LangRef.html#globalvars>and functions
> <http://llvm.org/docs/LangRef.html#functionstructure>are always implicitly valid
> (link-time) constants. "
Maybe you are looking for the indirectbr instruction?
Ciao, Duncan.
More information about the llvm-dev
mailing list