Maybe the title is somehow confused. but let me show you a example.
void foo(int val)
{
// do something
}
int i = 27;
int* pi = &i;
foo(*pi);
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.
Update:
I see some people confused this question. Alright, I have compiled this source code to the LLVM intermediate format flie(i.e. .ll file), so I have reached the step that intermediate code generation, what I can handle is LLVM IR related and I can only see i32, i32* and so on(there is no int, int* now). And I do not want to construct one pointer type, I just somehow want to 'reverse' *pi to pi so that I can check 'pi' is pointer type. The situation is like this: I have *pi, in the .ll file, maybe pi is
%pi = alloca i32*, align 32
%1 = load i32** %pi, align 32
%2 = load volatile i32* %1, align 1
%3 = call foo(i32 %2)
so if I check the argument type of function, I can only get i32, because it is pi now. But if I can get pi, i.e. %pi = alloca i32 align 32, I can know pi is pointer type.