I am an undergraduate student. For my final year project, to a part, I need to do some LLVM transformations through passes. I am not much familiar with LLVM so I don’t know it is a good question to ask. but do help if you can. I need to insert an instruction of the following signature: void MyThread::initialize(int num ,MyThread* myThread). So one of my call instruction is like: myThread->initialize(Count, myThread); So I tried to achieve this by like this: CallInst::Create(hook,args)->insertAfter(i) .Here args should be arrayref of llvm::Value . My question is how to get my custom class object (Mythread myThread)as StructType and pass it as Value so that I can insert the specific call instruction?
Thank you. Regards