I'm new to llvm and was trying to do instrument. But I found LLVM API only has primitive types, like: getInt32Ty(Ctx).. What i want to do use getOrInsertFunction(),the function argument type is string type.As is known, when argument type is int, we can do it like is :
LLVMContext &Ctx = F.getContext();
Constant *logFunc = F.getParent()->getOrInsertFunction(
"logop", Type::getVoidTy(Ctx), Type::getInt32Ty(Ctx), NULL );
Type::getInt32Ty(Ctx)
is the function argument type (int), what i want to do is:
getOrInsertFunction(
"logop", Type::getVoidTy(Ctx), string type, NULL);
The string type i don't know how to define it .In short, could you please tell me how to define it, thanks!