Basic test of the inlinr
authorChris Lattner <sabre@nondot.org>
Mon, 24 Jun 2002 17:46:05 +0000 (17:46 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 24 Jun 2002 17:46:05 +0000 (17:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2767 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/Inline/Makefile [new file with mode: 0644]
test/Transforms/Inline/basictest.ll [new file with mode: 0644]

diff --git a/test/Transforms/Inline/Makefile b/test/Transforms/Inline/Makefile
new file mode 100644 (file)
index 0000000..e6067bb
--- /dev/null
@@ -0,0 +1,12 @@
+
+LEVEL = ../../../..
+include $(LEVEL)/test/Makefile.tests
+
+TESTS := $(wildcard *.ll)
+
+all:: $(addprefix Output/, $(TESTS:%.ll=%.ibc))
+
+Output/%.ibc: %.ll Output/.dir $(LOPT)
+       ($(LAS) < $< | $(LOPT) -inline -q -f -o $@) || \
+           ( rm -f $@; $(FAILURE) $@ )
+
diff --git a/test/Transforms/Inline/basictest.ll b/test/Transforms/Inline/basictest.ll
new file mode 100644 (file)
index 0000000..ba79998
--- /dev/null
@@ -0,0 +1,11 @@
+
+
+int %func(int %i) {
+       ret int %i
+}
+
+int %main(int %argc) {
+       %X = call int %func(int 7)
+       %Y = add int %X, %argc
+       ret int %Y
+}