From 9b625030c8427a3bc56f5993c0b5b214c393042f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 6 May 2002 16:15:30 +0000 Subject: Replace all usages of Type::isPointerType with isa git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2486 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/iMemory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/VMCore') 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(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 &Idx, bool AllowCompositeLeaf = false) { - if (!Ptr->isPointerType()) return 0; // Type isn't a pointer type! + if (!isa(Ptr)) return 0; // Type isn't a pointer type! // Handle the special case of the empty set index set... if (Idx.empty()) return cast(Ptr)->getElementType(); @@ -143,7 +143,7 @@ GetElementPtrInst::GetElementPtrInst(Value *Ptr, const std::vector &Idx, //===----------------------------------------------------------------------===// FreeInst::FreeInst(Value *Ptr) : Instruction(Type::VoidTy, Free, "") { - assert(Ptr->getType()->isPointerType() && "Can't free nonpointer!"); + assert(isa(Ptr->getType()) && "Can't free nonpointer!"); Operands.reserve(1); Operands.push_back(Use(Ptr, this)); } -- cgit v1.1