search for: innerty

Displaying 3 results from an estimated 3 matches for "innerty".

2008 Nov 13
0
[LLVMdev] Using isa with derived types
...can make > sure that the pointer is pointing to a scalar value and not a function, > array, struct, etc. > > What am I missing? Please see the doxygen: http://llvm.org/doxygen/classllvm_1_1Type.html if (const PointerType *PTy = dyn_cast<PointerType>(...)) { const Type *InnerTy = PTy->getElementType(); switch (InnerTy->getTypeID()) { case Type::ArrayTyID: ... case Type::FunctionTyID: ... case Type::StructTyID: ... case Type::IntegerTyID: ... } } A switch on getTypeID() is equivalent to isa...
2008 Nov 13
3
[LLVMdev] Using isa with derived types
Hello, I am writing an optimization pass which optimizes code based on an online pointer analysis algorithm and need to detect pointers which are pointing to derived types. I have not had any problem identifying pointers in general using isa<PointerType>(...), but I can't seem to figure out how I can make sure that the pointer is pointing to a scalar value and not a function, array,
2008 Dec 08
1
[LLVMdev] Using isa with derived types
...gle scalar value. In other words, I want to ignore functions that accept arrays as arguments. Nick Lewycky wrote: > > Please see the doxygen: http://llvm.org/doxygen/classllvm_1_1Type.html > > if (const PointerType *PTy = dyn_cast<PointerType>(...)) { > const Type *InnerTy = PTy->getElementType(); > switch (InnerTy->getTypeID()) { > case Type::ArrayTyID: > ... > case Type::FunctionTyID: > ... > case Type::StructTyID: > ... > case Type::IntegerTyID: > ... > }...