[LLVMdev] Is any way to get deference pointer value's raw type(i.e. pointer type)

Wu Zhao bluechristlove at 163.com
Mon Mar 23 06:38:27 PDT 2015


Maybe the title is somehow confused. but let me show you a example.


[code]


void foo(int val)
{
    // do something
}


int i = 27;
int* pi = &i;


foo(*pi);


[/code]




Here, if we compile it using clang, the type of *pi will be i32, but we know pi is pointer type. 


my question is we use Function::getgetFunctionParamType method, the result will be i32. but how do I use some wayst to get ' pi ' type, not ' *pi ' type?  This problem has confused me some days. 


Thanks 


Best Regards


Wu Zhao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150323/57c72112/attachment.html>


More information about the llvm-dev mailing list