I am writing some C code using the LLVM C api. I need to check if an instruction value is of type int or is a pointer. What I have tried to do is use LLVMTypeOf(LLVMValueRef val) and just see if it equals ALL of the different types of int: LLVMInt1Type(), LLVMInt8Type(), LLVMInt16Type(), etc. I did not know how to figure out if it is a pointer type or not though and I think the method I was using to see if it was a integer is not working either.
Here is the API I have been referencing:
http://llvm.org/doxygen/modules.html
The C API is very limited.
I think you have to use C++ API or wrap the C++ API to C API by yourself.
For example,