diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-02 03:41:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-02 03:41:24 +0000 |
commit | da5581066696da706444b83a5729ea08b9190cd1 (patch) | |
tree | 2079bd1429d6b16c94df71bc918fe1f624aa3f2f /llvm/lib/ExecutionEngine | |
parent | 38569343868ee3dad90dcdddfb9fee1ca0bcf25f (diff) | |
download | bcm5719-llvm-da5581066696da706444b83a5729ea08b9190cd1.tar.gz bcm5719-llvm-da5581066696da706444b83a5729ea08b9190cd1.zip |
Commit more code over to new cast style
llvm-svn: 697
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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<ArrayType>(Ty) && cast<const ArrayType>(Ty)->isUnsized() && "Allocation inst with size operand for !unsized array type???"); - Ty = ((const ArrayType*)Ty)->getElementType(); // Get the actual type... + Ty = cast<const ArrayType>(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<FreeInst> (I), SF); break; + case Instruction::Load: executeLoadInst (cast<LoadInst> (I), SF); break; + case Instruction::Store: executeStoreInst (cast<StoreInst>(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<CallInst> (I), SF); break; + case Instruction::PHINode: executePHINode (cast<PHINode> (I), SF); break; + case Instruction::Shl: executeShlInst (cast<ShiftInst>(I), SF); break; + case Instruction::Shr: executeShrInst (cast<ShiftInst>(I), SF); break; + case Instruction::Cast: executeCastInst (cast<CastInst> (I), SF); break; default: cout << "Don't know how to execute this instruction!\n-->" << I; } |