<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 7/17/15 12:38 PM, Shen Liu wrote:<br>
</div>
<blockquote
cite="mid:CAHxbsctgd5_jJTjWeVa-=PjnSrqnZ7B0DeDfPSCr35E24nHKUg@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<div dir="ltr">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***?
<div><br>
</div>
<div>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!</div>
</div>
</blockquote>
<br>
You will need to use dyn_cast<PointerType> to cast the Type *
into a PointerType *. Once you do that, you can find the Type *
that the PointerType points to.<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote
cite="mid:CAHxbsctgd5_jJTjWeVa-=PjnSrqnZ7B0DeDfPSCr35E24nHKUg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Shen</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cs.rochester.edu_u_criswell&d=AwMD-g&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=qpR2jfF2RyfA9eOMgb3-KcgRCELbJXwPxZlhnERyBgU&s=KYfeiPAazVkNCiHdmm_1rLkgSv7awNHizQwAVsuLbjw&e=">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>