Clean up cast

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6174 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-05-13 20:29:17 +00:00
parent 67580ed715
commit 7e527424fc

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