Lines Matching refs:mod
58 void addMainFunction(Module *mod) {
60 Function *main_func = cast<Function>(mod->
61 getOrInsertFunction("main", IntegerType::getInt32Ty(mod->getContext()),
62 IntegerType::getInt32Ty(mod->getContext()),
64 IntegerType::getInt8Ty(mod->getContext()))), NULL));
74 BasicBlock *bb = BasicBlock::Create(mod->getContext(), "main.0", main_func);
78 CallInst *brainf_call = CallInst::Create(mod->getFunction("brainf"),
84 ReturnInst::Create(mod->getContext(),
85 ConstantInt::get(mod->getContext(), APInt(32, 0)), bb);
127 std::unique_ptr<Module> Mod(bf.parse(in, 65536, cf, Context)); // 64 KiB
130 addMainFunction(Mod.get());
133 if (verifyModule(*Mod)) {
143 Module &M = *Mod;
144 ExecutionEngine *ee = EngineBuilder(std::move(Mod)).create();
149 WriteBitcodeToFile(Mod.get(), *out);