Displaying 1 result from an estimated 1 matches for "bcall".
Did you mean:
call
2017 Mar 31
2
How to write the same things as `opt` command in C++ API
...quot;main",
module.get());
llvm::BasicBlock *const entry = llvm::BasicBlock::Create(context,
"entrypoint", main_func);
llvm::IRBuilder<> builder(entry);
builder.SetInsertPoint(entry);
llvm::CallInst *bCall = builder.CreateCall(bFun, {}, "b");
builder.CreateRet(bCall);
llvm::verifyFunction(*main_func);
}
pm.run(*module);
module->dump();
if you comment-outed `pm.run(*module);` you have the following output.
define private i32 @a() {
entry:
%c = call i32 @c()
ret i32 %c...