diff options
author | Sean Callanan <scallanan@apple.com> | 2012-04-23 17:25:38 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2012-04-23 17:25:38 +0000 |
commit | 1ef77434e3dcbc994ff7ff2280cac9033263a793 (patch) | |
tree | b7f553a73ed5937a920a80438ddb920fbbc55a7b /lldb/source/Expression/IRInterpreter.cpp | |
parent | 70b5e8eefc7ed340d12c7acd2b777c2bb319041e (diff) | |
download | bcm5719-llvm-1ef77434e3dcbc994ff7ff2280cac9033263a793.tar.gz bcm5719-llvm-1ef77434e3dcbc994ff7ff2280cac9033263a793.zip |
Implemented zext as a no-op cast in the IR
interpreter.
llvm-svn: 155360
Diffstat (limited to 'lldb/source/Expression/IRInterpreter.cpp')
-rw-r--r-- | lldb/source/Expression/IRInterpreter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 2deb87a5450..222d2d5c668 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<BitCastInst>(inst); + const CastInst *cast_inst = dyn_cast<CastInst>(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; |