[Lldb-commits] [lldb] r155360 - /lldb/trunk/source/Expression/IRInterpreter.cpp

Sean Callanan scallanan at apple.com
Mon Apr 23 10:25:38 PDT 2012


Author: spyffe
Date: Mon Apr 23 12:25:38 2012
New Revision: 155360

URL: http://llvm.org/viewvc/llvm-project?rev=155360&view=rev
Log:
Implemented zext as a no-op cast in the IR
interpreter.

Modified:
    lldb/trunk/source/Expression/IRInterpreter.cpp

Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=155360&r1=155359&r2=155360&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Mon Apr 23 12:25:38 2012
@@ -994,6 +994,7 @@
             case Instruction::Store:
             case Instruction::Sub:
             case Instruction::UDiv:
+            case Instruction::ZExt:
                 break;
             }
         }
@@ -1221,19 +1222,20 @@
             }
             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;
                 





More information about the lldb-commits mailing list