Displaying 1 result from an estimated 1 matches for "printfargtempl".
2012 Sep 27
0
[LLVMdev] Possible bug or misunderstanding of feature LLVMConstIntOfString
...Int8Type(), 0)
};
LLVMTypeRef vFnPrintfType = LLVMFunctionType(LLVMInt32Type(),
vpFnPrintfArgsType, 1, 1);
LLVMValueRef vFnPrintf = LLVMAddFunction(modCEx, "printf",
vFnPrintfType);
LLVMSetLinkage(vFnPrintf, LLVMExternalLinkage);
// printf with arguments
LLVMValueRef printfArgTemplate = LLVMBuildGlobalStringPtr(bldr,
template, "privateString");
LLVMValueRef vpArgsPrintf[] = { printfArgTemplate, testValue };
LLVMBuildCall(bldr, vFnPrintf, vpArgsPrintf, 2, "printf");
LLVMBuildRet(bldr, LLVMConstInt(LLVMInt32Type(), 0, 0));
// Dump Code:...