summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c8
-rw-r--r--lldb/source/Expression/IRInterpreter.cpp12
4 files changed, 27 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile
new file mode 100644
index 00000000000..f5a47fcc46c
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile
@@ -0,0 +1,3 @@
+LEVEL = ../../make
+C_SOURCES := main.c
+include $(LEVEL)/Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py b/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py
new file mode 100644
index 00000000000..03424658f3e
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), None)
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c b/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c
new file mode 100644
index 00000000000..156dbf04a1b
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c
@@ -0,0 +1,8 @@
+int main(void)
+{
+ __int128_t n = 1;
+ n = n + n;
+ return n; //%self.expect("p n", substrs=['(__int128_t) $0 = 2'])
+ //%self.expect("p n + 6", substrs=['(__int128) $1 = 8'])
+ //%self.expect("p n + n", substrs=['(__int128) $2 = 4'])
+}
diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp
index 990646da045..2c08d098b4d 100644
--- a/lldb/source/Expression/IRInterpreter.cpp
+++ b/lldb/source/Expression/IRInterpreter.cpp
@@ -613,6 +613,18 @@ bool IRInterpreter::CanInterpret(llvm::Module &module, llvm::Function &function,
}
}
+ // The IR interpreter currently doesn't know about
+ // 128-bit integers. As they're not that frequent,
+ // we can just fall back to the JIT rather than
+ // choking.
+ if (operand_type->getPrimitiveSizeInBits() > 64) {
+ if (log)
+ log->Printf("Unsupported operand type: %s",
+ PrintType(operand_type).c_str());
+ error.SetErrorString(unsupported_operand_error);
+ return false;
+ }
+
if (Constant *constant = llvm::dyn_cast<Constant>(operand)) {
if (!CanResolveConstant(constant)) {
if (log)
OpenPOWER on IntegriCloud