summaryrefslogtreecommitdiff
path: root/test/CodeGen/MIR/Generic/machine-basic-block-unknown-name.mir
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/MIR/Generic/machine-basic-block-unknown-name.mir')
-rw-r--r--test/CodeGen/MIR/Generic/machine-basic-block-unknown-name.mir18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/MIR/Generic/machine-basic-block-unknown-name.mir b/test/CodeGen/MIR/Generic/machine-basic-block-unknown-name.mir
new file mode 100644
index 0000000000000..876947b868b01
--- /dev/null
+++ b/test/CodeGen/MIR/Generic/machine-basic-block-unknown-name.mir
@@ -0,0 +1,18 @@
+# RUN: not llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
+# This test ensures that an error is reported whenever the MIR parser can't find
+# a basic block with the machine basis block's name.
+
+--- |
+
+ define i32 @foo() {
+ entry:
+ ret i32 0
+ }
+
+...
+---
+name: foo
+body: |
+ ; CHECK: [[@LINE+1]]:3: basic block 'entrie' is not defined in the function 'foo'
+ bb.0.entrie:
+...