New C backend testcases with first testcase
authorChris Lattner <sabre@nondot.org>
Fri, 17 May 2002 04:53:52 +0000 (04:53 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 17 May 2002 04:53:52 +0000 (04:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2638 91177308-0d34-0410-b5e6-96231b3b80d8

test/CBackend/2002-05-16-NameCollide.ll [new file with mode: 0644]
test/CBackend/Makefile [new file with mode: 0644]
test/CodeGen/CBackend/2002-05-16-NameCollide.ll [new file with mode: 0644]

diff --git a/test/CBackend/2002-05-16-NameCollide.ll b/test/CBackend/2002-05-16-NameCollide.ll
new file mode 100644 (file)
index 0000000..c08024b
--- /dev/null
@@ -0,0 +1,5 @@
+; Make sure that global variables do not collide if they have the same name,
+; but different types.
+
+%X = global int 5
+%X = global long 7
diff --git a/test/CBackend/Makefile b/test/CBackend/Makefile
new file mode 100644 (file)
index 0000000..27a3588
--- /dev/null
@@ -0,0 +1,22 @@
+#                    test/Regression/CBackend/Makefile
+#
+# This directory contains regression tests for the C backend for LLVM.  
+# These testcases are assembled with the LLVM assembler, then disassembled into
+# C code.  The C code should be compilable with the standard C compiler.
+#
+LEVEL = ../../..
+include $(LEVEL)/test/Makefile.tests
+
+.PRECIOUS: Output/%.c
+
+TESTS := $(wildcard *.ll)
+
+all:: $(addprefix Output/, $(TESTS:%.ll=%.to))
+
+
+Output/%.to: Output/%.c
+       gcc -c $< -o $@ || \
+               (rm -f $@; $(FAILURE) $@ )
+
+Output/%.c: %.ll Output/.dir $(LAS) $(LDIS)
+       $(LAS) < $< | $(LDIS) -c > $@
diff --git a/test/CodeGen/CBackend/2002-05-16-NameCollide.ll b/test/CodeGen/CBackend/2002-05-16-NameCollide.ll
new file mode 100644 (file)
index 0000000..c08024b
--- /dev/null
@@ -0,0 +1,5 @@
+; Make sure that global variables do not collide if they have the same name,
+; but different types.
+
+%X = global int 5
+%X = global long 7