forked from OSchip/llvm-project
parent
9c105cd27f
commit
09e2b44f84
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue