summaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
committerChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
commitb00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace (patch)
tree44b5f879c16e7ecb2e9334ad120e3454270e1bb3 /lib/ExecutionEngine
parent1d87bcf4909b06dcd86320722653341f08b8b396 (diff)
downloadexternal_llvm-b00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace.zip
external_llvm-b00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace.tar.gz
external_llvm-b00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace.tar.bz2
Commit more code over to new cast style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index d88d91f..34a80fe 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/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;
}