[LLVMdev] Cast specific pointer type to generic one
Tehila Mayzels
tehila at cs.technion.ac.il
Sat Mar 29 15:55:44 PDT 2014
Hi,
Suppose I have a pointer to "something" (a structure I defined) and I want
to pass the pointer to a generic function, that gets a 64-bit address
pointer.
How do I do that?
For instance:
The function is:
void Foo (void *);
I get the specific pointer using getPointerOperand() on a store instruction
that store to it:
inst->getPointerOperand()->getType()
Now I want to call Foo with the pointer, but the types of the arguments are
mismatches - one is specific (%"class.XXX::YYY"*) and the other generic.
How should I cast it so there won't be a mismatch?
Thanks in advance,
Tehila.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140330/1a3a7b0b/attachment.html>
More information about the llvm-dev
mailing list