Change usage of isPointerType to use isa
authorChris Lattner <sabre@nondot.org>
Mon, 6 May 2002 16:15:49 +0000 (16:15 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 May 2002 16:15:49 +0000 (16:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2487 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/Interpreter/Execution.cpp

index b9f8030a468b6c751de0c5d088b8131e2b6473bb..8ba41158fe42e84a20f248709e65b99f60c35265 100644 (file)
@@ -776,7 +776,7 @@ void Interpreter::executeAllocInst(AllocationInst *I, ExecutionContext &SF) {
 }
 
 static void executeFreeInst(FreeInst *I, ExecutionContext &SF) {
-  assert(I->getOperand(0)->getType()->isPointerType() && "Freeing nonptr?");
+  assert(isa<PointerType>(I->getOperand(0)->getType()) && "Freeing nonptr?");
   GenericValue Value = getOperandValue(I->getOperand(0), SF);
   // TODO: Check to make sure memory is allocated
   free((void*)Value.PointerVal);   // Free memory