Displaying 1 result from an estimated 1 matches for "callprintf".
Did you mean:
callprint
2015 May 28
1
[LLVMdev] Passing ConstantDataArray to GetElementPtrInst
...tor;
index_vector.push_back(Builder.getInt32(0));
index_vector.push_back(Builder.getInt32(0));
auto valueAsPtr = Builder.CreateGEP(strValue, index_vector, "tmp1");
args.push_back(valueAsPtr);
Builder.CreateCall(TheModule->getFunction("printf"), args, "callprintf");
Note that this is summarized, I already have the IRBuilder, etc initialized.
I've also tried this with a LoadInstr that loads the ConstantDataArray (I
just inserted strValue into the example code to simplify things, I get the
same error either way).
If I run this code, LLVM asserts...