From 3fa3e65d3bf9267c5a7192530f32f167d552962e Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Thu, 2 May 2013 00:33:44 +0000 Subject: Since the IR interpreter does not (currently) support operands with vector types, it now reports that it cannot interpret expressions that use vector types. They get sent to the JIT instead. llvm-svn: 180899 --- lldb/source/Expression/IRInterpreter.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'lldb/source/Expression/IRInterpreter.cpp') diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 366a11526d2..b3c35bf8e9a 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -409,6 +409,7 @@ public: }; static const char *unsupported_opcode_error = "Interpreter doesn't handle one of the expression's opcodes"; +static const char *unsupported_operand_error = "Interpreter doesn't handle one of the expression's operands"; //static const char *interpreter_initialization_error = "Interpreter couldn't be initialized"; static const char *interpreter_internal_error = "Interpreter encountered an internal error"; static const char *bad_value_error = "Interpreter couldn't resolve a value during execution"; @@ -505,7 +506,29 @@ IRInterpreter::CanInterpret (llvm::Module &module, case Instruction::ZExt: break; } + + for (int oi = 0, oe = ii->getNumOperands(); + oi != oe; + ++oi) + { + Value *operand = ii->getOperand(oi); + Type *operand_type = operand->getType(); + + switch (operand_type->getTypeID()) + { + default: + break; + case Type::VectorTyID: + { + if (log) + log->Printf("Unsupported operand type: %s", PrintType(operand_type).c_str()); + error.SetErrorString(unsupported_operand_error); + return false; + } + } + } } + } return true;} -- cgit v1.2.3