[LLVMdev] create dummy function
oleg77 at gmail.com
Thu Nov 5 04:30:49 CST 2009
I have a simple question. How to create "dummy" function which will
have no functionality behind (return nothing and do nothing)?
Currently I'm trying to do this:
llvm::Constant* c = Module.getOrInsertFunction("dummy",
llvm::Function* dummy = llvm::cast<llvm::Function>(c);
This way I create new function that do nothing.Then next step is:
This code is doing what I want to do, but it ends up with exception:
ERROR: Program used external function 'dummy' which could not be resolved!
I think I'm doing something wrong or there is a different way to
create such functions.
Thank you in advance,
More information about the LLVMdev