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 On Mon, Aug 20, 2012 at 12:39 PM, John Backes <back0145 at umn.edu> wrote:> 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 > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120820/be3351fe/attachment.html>
George, Thanks a lot! This is exactly what I was looking for. - John On 08/20/2012 09:53 AM, George Baah wrote:> You can use isPointerTy() in Type class. > > George > > On Mon, Aug 20, 2012 at 12:39 PM, John Backes <back0145 at umn.edu > <mailto:back0145 at umn.edu>> wrote: > > 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 > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> > http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120820/8afd5996/attachment.html>
Rinaldini Julien
2012-Aug-20 17:00 UTC
[LLVMdev] RE : How to Identify if an Argument is a pointer?
Hi, You can use isPointerTy() from http://llvm.org/docs/doxygen/html/classllvm_1_1Type.html Cheers ________________________________________ De : llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] de la part de John Backes [back0145 at umn.edu] Date d'envoi : lundi 20 août 2012 18:39 À : llvmdev at cs.uiuc.edu Objet : [LLVMdev] 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 _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reasonably Related Threads
- [LLVMdev] How to Identify if an Argument is a pointer?
- encoding from 22050Hz source
- [LLVMdev] Strange behavior when converting arrays to strings
- [LLVMdev] Strange behavior when converting arrays to strings
- [LLVMdev] Strange behavior when converting arrays to strings