Displaying 1 result from an estimated 1 matches for "externalfn_ir".
2019 Jan 02
2
JIT compiler, Windows, external functions like cos
...uot;cos";
InitializeNativeTarget();
InitializeNativeTargetAsmPrinter();
InitializeNativeTargetAsmParser();
LLVMContext context;
IRBuilder<> builder(context);
std::unique_ptr<llvm::Module> module(new Module("TestModule", context));
Module* pModule = module.get();
auto externalFn_IR =
cast<Function>(pModule->getOrInsertFunction("externalFn",
Type::getDoubleTy(context), Type::getDoubleTy(context)));
Value* x = externalFn_IR->arg_begin();
x->setName("x");
BasicBlock *entryBlock = BasicBlock::Create(context, "EntryBlock",
externalF...