Displaying 1 result from an estimated 1 matches for "call_print_ptr".
2013 Dec 20
0
[LLVMdev] A problem about convert a string to a *i8 pointer
...getInt32Ty(ctx));
// what's the function of the three line code below?
std::vector<llvm::Constant*> indices;
indices.push_back(zero);
indices.push_back(zero);
Constant *test_var = ConstantExpr::getGetElementPtr(g_print,indices);
and then I use
CallInst *call = builder.CreateCall2(call_print_ptr,var_ref,test_var);
to create the instruction and insert it.
The method works well .But I didn't know the function of the
std::vector<llvm::Constant*> indices;
indices.push_back(zero);
indices.push_back(zero);
is that just create a arrayRef that can be the parameter of the
getGetEleme...