aboutsummaryrefslogtreecommitdiffstats
path: root/test/CBackend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-17 04:53:52 +0000
committerChris Lattner <sabre@nondot.org>2002-05-17 04:53:52 +0000
commit1c1f558695a5fa2a192be136440b0307eceb70b3 (patch)
tree05c9df8f3d01e2fd0077cfb030697732489d9863 /test/CBackend
parenta36e6c8cd58c2876decd2d0402064ac349bbec71 (diff)
downloadexternal_llvm-1c1f558695a5fa2a192be136440b0307eceb70b3.zip
external_llvm-1c1f558695a5fa2a192be136440b0307eceb70b3.tar.gz
external_llvm-1c1f558695a5fa2a192be136440b0307eceb70b3.tar.bz2
New C backend testcases with first testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CBackend')
-rw-r--r--test/CBackend/2002-05-16-NameCollide.ll5
-rw-r--r--test/CBackend/Makefile22
2 files changed, 27 insertions, 0 deletions
diff --git a/test/CBackend/2002-05-16-NameCollide.ll b/test/CBackend/2002-05-16-NameCollide.ll
new file mode 100644
index 0000000..c08024b
--- /dev/null
+++ b/test/CBackend/2002-05-16-NameCollide.ll
@@ -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
index 0000000..27a3588
--- /dev/null
+++ b/test/CBackend/Makefile
@@ -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 > $@