search for: sprintfft

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

Did you mean: sprintf
2015 Nov 24
2
How to create a sprintf call in IR
...vm::getGlobalContext(), 8); ArrayType* ty = ArrayType::get(CHARTYPE, 1024); GlobalVariable* buffer = new GlobalVariable(mod, ty, false, GlobalValue::ExternalLinkage, 0, "buffer"); 2. Create sprintf std::vector<Type*> agrs(2, Type::getInt8PtrTy(ctxt)); FunctionType* sprintfFT = FunctionType::get(Type::getInt32Ty(ctxt), args, true); Constant* sprintf = mod->getOrInsertFunction("sprintf", sprintfFT); Now, I got stuck to create teh function call for sprintf. I didn't it like the following: Value* str = builder.CreateGlobalStringPtr("s...