summaryrefslogtreecommitdiffstats
path: root/llvm/test/Verifier
diff options
context:
space:
mode:
authorDjordje Todorovic <djordje.todorovic@rt-rk.com>2019-06-27 13:52:34 +0000
committerDjordje Todorovic <djordje.todorovic@rt-rk.com>2019-06-27 13:52:34 +0000
commita0d45058ebb39dc18cbcdcba01d11d36eca001be (patch)
treea5a1d6c8bee81c6fd5322c99ec0887959905625f /llvm/test/Verifier
parentc692a8dc51de996eed2214379c368c93e9a5354b (diff)
downloadbcm5719-llvm-a0d45058ebb39dc18cbcdcba01d11d36eca001be.tar.gz
bcm5719-llvm-a0d45058ebb39dc18cbcdcba01d11d36eca001be.zip
[DWARF] Handle the DW_OP_entry_value operand
Add the IR and the AsmPrinter parts for handling of the DW_OP_entry_values DWARF operation. ([11/13] Introduce the debug entry values.) Co-authored-by: Ananth Sowda <asowda@cisco.com> Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com> Co-authored-by: Ivan Baev <ibaev@cisco.com> Differential Revision: https://reviews.llvm.org/D60866 llvm-svn: 364542
Diffstat (limited to 'llvm/test/Verifier')
-rw-r--r--llvm/test/Verifier/diexpression-entry-value.ll7
-rw-r--r--llvm/test/Verifier/diexpression-valid-entry-value.ll5
2 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Verifier/diexpression-entry-value.ll b/llvm/test/Verifier/diexpression-entry-value.ll
new file mode 100644
index 00000000000..477b20079aa
--- /dev/null
+++ b/llvm/test/Verifier/diexpression-entry-value.ll
@@ -0,0 +1,7 @@
+; RUN: not opt -S < %s 2>&1 | FileCheck %s
+
+!named = !{!0, !1, !2}
+; CHECK: invalid expression
+!0 = !DIExpression(DW_OP_entry_value, 4, DW_OP_constu, 0, DW_OP_stack_value)
+!1 = !DIExpression(DW_OP_constu, 0, DW_OP_entry_value, 1, DW_OP_constu, 0)
+!2 = !DIExpression(DW_OP_entry_value, 100, DW_OP_constu, 0)
diff --git a/llvm/test/Verifier/diexpression-valid-entry-value.ll b/llvm/test/Verifier/diexpression-valid-entry-value.ll
new file mode 100644
index 00000000000..e162b8a50ed
--- /dev/null
+++ b/llvm/test/Verifier/diexpression-valid-entry-value.ll
@@ -0,0 +1,5 @@
+; RUN: opt -S < %s 2>&1 | FileCheck %s
+
+!named = !{!0}
+; CHECK-NOT: invalid expression
+!0 = !DIExpression(DW_OP_entry_value, 1)
OpenPOWER on IntegriCloud