From da5581066696da706444b83a5729ea08b9190cd1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 2 Oct 2001 03:41:24 +0000 Subject: Commit more code over to new cast style llvm-svn: 697 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'llvm/lib/ExecutionEngine/Interpreter') diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp index d88d91ff1f9..34a80fedd41 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -351,9 +351,9 @@ void Interpreter::executeAllocInst(AllocationInst *I, ExecutionContext &SF) { unsigned NumElements = 1; if (I->getNumOperands()) { // Allocating a unsized array type? - assert(Ty->isArrayType() && Ty->castArrayType()->isUnsized() && + assert(isa(Ty) && cast(Ty)->isUnsized() && "Allocation inst with size operand for !unsized array type???"); - Ty = ((const ArrayType*)Ty)->getElementType(); // Get the actual type... + Ty = cast(Ty)->getElementType(); // Get the actual type... // Get the number of elements being allocated by the array... GenericValue NumEl = getOperandValue(I->getOperand(0), SF); @@ -665,16 +665,16 @@ bool Interpreter::executeInstruction() { // Memory Instructions case Instruction::Alloca: case Instruction::Malloc: executeAllocInst ((AllocationInst*)I, SF); break; - case Instruction::Free: executeFreeInst ((FreeInst*) I, SF); break; - case Instruction::Load: executeLoadInst ((LoadInst*) I, SF); break; - case Instruction::Store: executeStoreInst ((StoreInst*) I, SF); break; + case Instruction::Free: executeFreeInst (cast (I), SF); break; + case Instruction::Load: executeLoadInst (cast (I), SF); break; + case Instruction::Store: executeStoreInst (cast(I), SF); break; // Miscellaneous Instructions - case Instruction::Call: executeCallInst ((CallInst*) I, SF); break; - case Instruction::PHINode: executePHINode ((PHINode*) I, SF); break; - case Instruction::Shl: executeShlInst ((ShiftInst*) I, SF); break; - case Instruction::Shr: executeShrInst ((ShiftInst*) I, SF); break; - case Instruction::Cast: executeCastInst ((CastInst*) I, SF); break; + case Instruction::Call: executeCallInst (cast (I), SF); break; + case Instruction::PHINode: executePHINode (cast (I), SF); break; + case Instruction::Shl: executeShlInst (cast(I), SF); break; + case Instruction::Shr: executeShrInst (cast(I), SF); break; + case Instruction::Cast: executeCastInst (cast (I), SF); break; default: cout << "Don't know how to execute this instruction!\n-->" << I; } -- cgit v1.2.3