Clean up cast

llvm-svn: 6174
This commit is contained in:
Chris Lattner 2003-05-13 20:29:17 +00:00
parent 9c105cd27f
commit 09e2b44f84
1 changed files with 1 additions and 1 deletions

View 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)));