Displaying 1 result from an estimated 1 matches for "getlabelty".
Did you mean:
getlabel
2015 Aug 19
5
creating a callinst to an external function
...ll:
Type* retTy = Type::getInt32Ty(C);
FunctionType* FuncTy = FunctionType::get(retTy, false);
PointerType* PtrToFuncTy = PointerType::get(FuncTy, 0);
Constant *fun = M->getOrInsertFunction("foo", Type::getVoidTy(C), PtrToFuncTy, Type::getLabelTy(C), nullptr);
Function *dofoo = cast<Function>(fun);
Instruction* dofooCall = CallInst::Create(fun, Args2, "", bb);
Note: Args2 is an arraylist containing 2 value pointers to a function and a basicblock, bb is the basicblock to insert the call in.
When...