Home | History | Annotate | Download | only in BrainF

Lines Matching defs:mod

57 void addMainFunction(Module *mod) {
59 Function *main_func = cast<Function>(mod->
60 getOrInsertFunction("main", IntegerType::getInt32Ty(mod->getContext()),
61 IntegerType::getInt32Ty(mod->getContext()),
63 IntegerType::getInt8Ty(mod->getContext()))), NULL));
73 BasicBlock *bb = BasicBlock::Create(mod->getContext(), "main.0", main_func);
77 CallInst *brainf_call = CallInst::Create(mod->getFunction("brainf"),
83 ReturnInst::Create(mod->getContext(),
84 ConstantInt::get(mod->getContext(), APInt(32, 0)), bb);
127 Module *mod = bf.parse(in, 65536, cf, Context); //64 KiB
130 addMainFunction(mod);
133 if (verifyModule(*mod)) {
143 ExecutionEngine *ee = EngineBuilder(mod).create();
145 Function *brainf_func = mod->getFunction("brainf");
148 WriteBitcodeToFile(mod, *out);
154 delete mod;