search for: printf_prototyp

Displaying 1 result from an estimated 1 matches for "printf_prototyp".

Did you mean: printf_prototype
2013 Dec 16
3
[LLVMdev] Add call printf instructions problems
...before every instruction in the LLVM IR. here is what I wrote: namespace { class call_print : public FunctionPass{ private: DenseMap<const Value*, int> inst_map; public: static char ID; call_print() : FunctionPass(ID){} //define a extern function "printf" static llvm::Function* printf_prototype(llvm::LLVMContext& ctx, llvm::Module *mod) { std::vector<llvm::Type*> printf_arg_types; printf_arg_types.push_back(llvm::Type::getInt32Ty(ctx)); llvm::FunctionType* printf_type = llvm::FunctionType::get(llvm::Type::getInt32Ty(ctx), printf_arg_types, true); llvm:...