(original) (raw)
On 7/17/15 12:38 PM, Shen Liu wrote:
Hi all, as a LLVM beginner I would like to know how can i check the pointer types with different levels like int 32\* and int 32\*\*, int 32\*\*\*?�
By using value->getType()->isPointerTy() i can just know they are pointers. But the dump results clearly show they are different. Is there a good way to calculate their actual point to levels? Thanks!
You will need to use dyn\_cast to cast the Type \* into a PointerType \*.� Once you do that, you can find the Type \* that the PointerType points to.
Regards,
John Criswell
Best regards,
Shen
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ LLVM Developers mailing list LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-- John Criswell Assistant Professor Department of Computer Science, University of Rochester http://www.cs.rochester.edu/u/criswell