summaryrefslogtreecommitdiff
path: root/test/tools/llvm-split/function.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools/llvm-split/function.ll')
-rw-r--r--test/tools/llvm-split/function.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/tools/llvm-split/function.ll b/test/tools/llvm-split/function.ll
new file mode 100644
index 0000000000000..37272dbbcee24
--- /dev/null
+++ b/test/tools/llvm-split/function.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-split -o %t %s
+; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
+; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
+
+; CHECK0: define void @foo()
+; CHECK1: declare void @foo()
+define void @foo() {
+ call void @bar()
+ ret void
+}
+
+; CHECK0: declare void @bar()
+; CHECK1: define void @bar()
+define void @bar() {
+ call void @foo()
+ ret void
+}