[LLVMdev] Create Function without knowing return type
William Moses
moses.williamsteven at gmail.com
Tue Jan 21 20:52:57 PST 2014
All,
Is it possible to create a function without yet knowing the return type of
the function.
E.g. something like
ArrayRef<Type*> args = ...
FunctionType *FT = FunctionType::get(args, false);
Function *F = Function::create("",FT,Function::ExternalLinkage);
BasicBlock *BB = BasicBlock::Create(getGlobalContext(), "entry", F);
...
some code that creates body of function
...
F->setReturnType(type);
FT->setReturnType(type);
Thanks,
Billy Moses
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140121/b136f038/attachment.html>
More information about the llvm-dev
mailing list