From 1ef77434e3dcbc994ff7ff2280cac9033263a793 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Mon, 23 Apr 2012 17:25:38 +0000 Subject: [PATCH] Implemented zext as a no-op cast in the IR interpreter. llvm-svn: 155360 --- lldb/source/Expression/IRInterpreter.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 2deb87a5450f..222d2d5c668b 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -994,6 +994,7 @@ IRInterpreter::supportsFunction (Function &llvm_function, case Instruction::Store: case Instruction::Sub: case Instruction::UDiv: + case Instruction::ZExt: break; } } @@ -1221,19 +1222,20 @@ IRInterpreter::runOnFunction (lldb::ClangExpressionVariableSP &result, } break; case Instruction::BitCast: + case Instruction::ZExt: { - const BitCastInst *bit_cast_inst = dyn_cast(inst); + const CastInst *cast_inst = dyn_cast(inst); - if (!bit_cast_inst) + if (!cast_inst) { if (log) - log->Printf("getOpcode() returns BitCast, but instruction is not a BitCastInst"); + log->Printf("getOpcode() returns %s, but instruction is not a BitCastInst", cast_inst->getOpcodeName()); err.SetErrorToGenericError(); err.SetErrorString(interpreter_internal_error); return false; } - Value *source = bit_cast_inst->getOperand(0); + Value *source = cast_inst->getOperand(0); lldb_private::Scalar S; -- GitLab