summaryrefslogtreecommitdiff
path: root/test/CodeGen/MIR/machine-function-missing-function.mir
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-06-21 13:59:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-06-21 13:59:01 +0000
commit3a0822f094b578157263e04114075ad7df81db41 (patch)
treebc48361fe2cd1ca5f93ac01b38b183774468fc79 /test/CodeGen/MIR/machine-function-missing-function.mir
parent85d8b2bbe386bcfe669575d05b61482d7be07e5d (diff)
Diffstat (limited to 'test/CodeGen/MIR/machine-function-missing-function.mir')
-rw-r--r--test/CodeGen/MIR/machine-function-missing-function.mir19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/MIR/machine-function-missing-function.mir b/test/CodeGen/MIR/machine-function-missing-function.mir
new file mode 100644
index 000000000000..eed4142d6597
--- /dev/null
+++ b/test/CodeGen/MIR/machine-function-missing-function.mir
@@ -0,0 +1,19 @@
+# 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 when the mir file has LLVM IR and
+# one of the machine functions has a name that doesn't match any function in
+# the LLVM IR.
+
+--- |
+
+ define i32 @foo() {
+ ret i32 0
+ }
+
+...
+---
+name: foo
+...
+---
+# CHECK: function 'faa' isn't defined in the provided LLVM IR
+name: faa
+...