[llvm-dev] Struct type as function argument while inserting call instruction through llvm pass
Ramesh Kirosh via llvm-dev
llvm-dev at lists.llvm.org
Sun Sep 1 23:57:54 PDT 2019
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
Kirosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190902/7e16dffd/attachment.html>
More information about the llvm-dev
mailing list