How to Identify if an Argument is a pointer?

Hello,

I was wondering how you can identify whether or not an Argument is a pointer. The "isDereferenceablePointer" function for Values doesn't seem to be what I want (I don't care whether or not the pointer points to allocated memory or is suitably aligned). I want to be able to discern between:

i32* %pArray

and

i32 %pArray

Thanks in advance.

- John

You can use isPointerTy() in Type class.

George

George,

Thanks a lot! This is exactly what I was looking for.

  • John

Hi,

You can use isPointerTy() from http://llvm.org/docs/doxygen/html/classllvm_1_1Type.html

Cheers