Clean up cast
authorChris Lattner <sabre@nondot.org>
Tue, 13 May 2003 20:29:17 +0000 (20:29 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 13 May 2003 20:29:17 +0000 (20:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6174 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/ExecutionEngine.cpp

index a3c3f47036f0416352963ed041fe800f4b72c274..0b5d19eb6f9cc32c0a7a6aa8fa96cb8bd48dc952 100644 (file)
@@ -31,7 +31,7 @@ void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) {
 GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
   GenericValue Result;
 
-  if (ConstantExpr *CE = (ConstantExpr*)dyn_cast<ConstantExpr>(C))
+  if (ConstantExpr *CE = const_cast<ConstantExpr*>(dyn_cast<ConstantExpr>(C)))
     switch (CE->getOpcode()) {
     case Instruction::GetElementPtr: {
       Result = getConstantValue(cast<Constant>(CE->getOperand(0)));