summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-06-16 17:06:29 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-06-16 17:06:29 +0000
commit5ef16b8a7c107141541430233cea2263caaf85d1 (patch)
tree6b93a5483edba93a6f47411e615daed050dea4ed /llvm/test
parent7ac23c3ae066eaf998cdaa6e7f001c290486d8b9 (diff)
downloadbcm5719-llvm-5ef16b8a7c107141541430233cea2263caaf85d1.tar.gz
bcm5719-llvm-5ef16b8a7c107141541430233cea2263caaf85d1.zip
MIR Parser: Report an error when a machine function doesn't have a corresponding function.
This commit reports an error when a machine function from a MIR file that contains LLVM IR can't find a function with the same name in the loaded LLVM IR module. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10468 llvm-svn: 239831
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/MIR/machine-function-missing-function.mir19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/MIR/machine-function-missing-function.mir b/llvm/test/CodeGen/MIR/machine-function-missing-function.mir
new file mode 100644
index 00000000000..eed4142d659
--- /dev/null
+++ b/llvm/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
+...
OpenPOWER on IntegriCloud