diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-06 16:15:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-06 16:15:30 +0000 |
commit | 9b625030c8427a3bc56f5993c0b5b214c393042f (patch) | |
tree | 40bf688c425d93346f3f3a1119f4a9049682724e /lib/VMCore | |
parent | d44023ecb7a699e52f119bec0eb86830989ff35a (diff) | |
download | external_llvm-9b625030c8427a3bc56f5993c0b5b214c393042f.zip external_llvm-9b625030c8427a3bc56f5993c0b5b214c393042f.tar.gz external_llvm-9b625030c8427a3bc56f5993c0b5b214c393042f.tar.bz2 |
Replace all usages of Type::isPointerType with isa<PointerType>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2486 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/iMemory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/iMemory.cpp b/lib/VMCore/iMemory.cpp index 0a62d1c..3d0c753 100644 --- a/lib/VMCore/iMemory.cpp +++ b/lib/VMCore/iMemory.cpp @@ -16,7 +16,7 @@ static inline const Type *checkType(const Type *Ty) { AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, const std::string &Name = "") : Instruction(Ty, iTy, Name) { - assert(Ty->isPointerType() && "Can't allocate a non pointer type!"); + assert(isa<PointerType>(Ty) && "Can't allocate a non pointer type!"); // ArraySize defaults to 1. if (!ArraySize) ArraySize = ConstantUInt::get(Type::UIntTy, 1); @@ -51,7 +51,7 @@ const Type *AllocationInst::getAllocatedType() const { const Type* MemAccessInst::getIndexedType(const Type *Ptr, const std::vector<Value*> &Idx, bool AllowCompositeLeaf = false) { - if (!Ptr->isPointerType()) return 0; // Type isn't a pointer type! + if (!isa<PointerType>(Ptr)) return 0; // Type isn't a pointer type! // Handle the special case of the empty set index set... if (Idx.empty()) return cast<PointerType>(Ptr)->getElementType(); @@ -143,7 +143,7 @@ GetElementPtrInst::GetElementPtrInst(Value *Ptr, const std::vector<Value*> &Idx, //===----------------------------------------------------------------------===// FreeInst::FreeInst(Value *Ptr) : Instruction(Type::VoidTy, Free, "") { - assert(Ptr->getType()->isPointerType() && "Can't free nonpointer!"); + assert(isa<PointerType>(Ptr->getType()) && "Can't free nonpointer!"); Operands.reserve(1); Operands.push_back(Use(Ptr, this)); } |