<br>Your last statement is correct. But still my stand does not change. I want to differentiate ordinary local variable & pointer variables.<br>Let's have a program,<br>int a,b,c,*ptr;<br><br>I want to extract only the local variables. That's what my question was. I think it is clear now. cast<PointerType>(A->getType()<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
)->getElementType() is not working. I am also getting error with A->getAllocatedType(). <br></blockquote><br><br><br><div class="gmail_quote">On 22 July 2010 01:01, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Soumya_Prasad_Ukil,<br>
<div class="im"><br>
> How to recognize pointer variable & ordinary variable? I have tried with<br>
> "isa<PointerType>(V->getType())", but failed.<br>
<br>
</div>I'm not sure what you are asking, but if you are asking whether an<br>
alloca instruction A represents local memory of pointer type, you<br>
can use A->getAllocatedType().  You can also use<br>
cast<PointerType>(A->getType())->getElementType().  The reason that<br>
an alloca instruction always has pointer type is that the instruction<br>
represents a pointer to the allocated memory.<br>
<br>
Ciao,<br>
<br>
Duncan.<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>regards,<br>soumya prasad ukil<br>