Home | History | Annotate | Download | only in BrainF

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);
128 Module *mod = bf.parse(in, 65536, cf, Context); //64 KiB
131 addMainFunction(mod);
134 if (verifyModule(*mod)) {
144 ExecutionEngine *ee = EngineBuilder(mod).create();
146 Function *brainf_func = mod->getFunction("brainf");
149 WriteBitcodeToFile(mod, *out);
155 delete mod;