summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/IRInterpreter.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2013-05-02 00:33:44 +0000
committerSean Callanan <scallanan@apple.com>2013-05-02 00:33:44 +0000
commit3fa3e65d3bf9267c5a7192530f32f167d552962e (patch)
treec7b4d28723c414e0d8e8ca6adf964a36aae30783 /lldb/source/Expression/IRInterpreter.cpp
parentacff8950158125374cde999738dac3b6b8348ff4 (diff)
downloadbcm5719-llvm-3fa3e65d3bf9267c5a7192530f32f167d552962e.tar.gz
bcm5719-llvm-3fa3e65d3bf9267c5a7192530f32f167d552962e.zip
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. <rdar://problem/13733651> llvm-svn: 180899
Diffstat (limited to 'lldb/source/Expression/IRInterpreter.cpp')
-rw-r--r--lldb/source/Expression/IRInterpreter.cpp23
1 files changed, 23 insertions, 0 deletions
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;}
OpenPOWER on IntegriCloud