llvm.org GIT mirror llvm / e3e7c47
Checkin of autoconf-style object root. Updated TestRunner tests so that they work correctly in a separate object root directory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8383 91177308-0d34-0410-b5e6-96231b3b80d8 John Criswell 16 years ago
19 changed file(s) with 57 addition(s) and 57 deletion(s). Raw diff Collapse all Expand all
44 ; of the bug that was causing the Olden Health benchmark to output incorrect
55 ; results!
66 ;
7 ; RUN: as < %s | opt -constprop | dis > Output/%s && \
8 ; RUN: as < %s | dis | as | opt -constprop | dis > Output/%s2 && \
9 ; RUN: diff Output/%s Output/%s2
7 ; RUN: as < %s | opt -constprop | dis > s1 && \
8 ; RUN: as < %s | dis | as | opt -constprop | dis > s2 && \
9 ; RUN: diff s1 s2
1010
1111 implementation
1212
0
1 ; RUN: as < %s | dis -c > Output/%s.cbe.c
2 ; RUN: gcc -B/usr/bin/ Output/%s.cbe.c -o Output/%s.cbe
3 ; RUN: Output/%s.cbe
1 ; RUN: as < %s | dis -c > f1.cbe.c
2 ; RUN: gcc -B/usr/bin/ f1.cbe.c -o f1.cbe
3 ; RUN: ./f1.cbe
44
55 bool %doTest(ubyte %x) {
66 %dec.0 = add ubyte %x, 255
0
1 ; RUN: as < %s | dis -c > Output/%s.cbe.c
2 ; RUN: gcc -B/usr/bin/ Output/%s.cbe.c -o Output/%s.cbe
3 ; RUN: Output/%s.cbe
1 ; RUN: as < %s | dis -c > f1.cbe.c
2 ; RUN: gcc -B/usr/bin/ f1.cbe.c -o f1.cbe
3 ; RUN: ./f1.cbe
44
55 bool %doTest(ubyte %x) {
66 %dec.0 = add ubyte %x, 255
None ; RUN: as < %s > Output/%s.bc
1 ; RUN: echo | as > Output/%s.tmp.bc
2 ; RUN: link Output/%s.tmp.bc Output/%s.bc
0 ; RUN: as < %s > %t.bc
1 ; RUN: echo | as > %t.tmp.bc
2 ; RUN: link %t.tmp.bc %t.bc
33
44 %X = constant int 5
55 %Y = internal global [2 x int*] [ int* %X, int * %X]
0 ; This fails linking when it is linked with an empty file as the first object file
11
2 ; RUN: as > Output/LinkTest1.bc < /dev/null
3 ; RUN: as < %s > Output/LinkTest2.bc
4 ; RUN: link Output/LinkTest[12].bc
2 ; RUN: as > %t1.bc < /dev/null
3 ; RUN: as < %s > %t2.bc
4 ; RUN: link %t[12].bc
55
66 %work = global int (int, int)* %zip
77
0 ; This fails linking when it is linked with an empty file as the first object file
11
2 ; RUN: as > Output/%s.LinkTest.bc < /dev/null
3 ; RUN: as < %s > Output/%s.bc
4 ; RUN: link Output/%s.LinkTest.bc Output/%s.bc
2 ; RUN: as > %t.LinkTest.bc < /dev/null
3 ; RUN: as < %s > %t.bc
4 ; RUN: link %t.LinkTest.bc %t.bc
55
66 %work = global int 4
77 %test = global int* getelementptr( int* %work, long 1)
0 ; This fails because the linker renames the external symbol not the internal
11 ; one...
22
3 ; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > Output/%s.1.bc
4 ; RUN: as < %s > Output/%s.2.bc
5 ; RUN: link Output/%s.[12].bc | dis | grep '%foo()' | grep -v internal
3 ; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > %t.1.bc
4 ; RUN: as < %s > %t.2.bc
5 ; RUN: link %t.[12].bc | dis | grep '%foo()' | grep -v internal
66
77 implementation
88 int %foo() { ret int 0 }
0 ; This fails because the linker renames the non-opaque type not the opaque
11 ; one...
22
3 ; RUN: echo "%Ty = type opaque" | as > Output/%s.1.bc
4 ; RUN: as < %s > Output/%s.2.bc
5 ; RUN: link Output/%s.[12].bc | dis | grep '%Ty ' | grep -v opaque
3 ; RUN: echo "%Ty = type opaque" | as > %t.1.bc
4 ; RUN: as < %s > %t.2.bc
5 ; RUN: link %t.[12].bc | dis | grep '%Ty ' | grep -v opaque
66
77 %Ty = type int
88
None ; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | as > Output/%s.1.bc
1 ; RUN: as < %s > Output/%s.2.bc
2 ; RUN: link Output/%s.[12].bc
0 ; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | as > %t.1.bc
1 ; RUN: as < %s > %t.2.bc
2 ; RUN: link %t.[12].bc
33 %X = external global int
44
55 implementation
0 ; This fails because the linker renames the non-opaque type not the opaque
11 ; one...
22
3 ; RUN: echo "implementation linkonce void %foo() { ret void } " | as > Output/%s.2.bc
4 ; RUN: as < %s > Output/%s.1.bc
5 ; RUN: link Output/%s.[12].bc | dis | grep foo | grep linkonce
3 ; RUN: echo "implementation linkonce void %foo() { ret void } " | as > %t.2.bc
4 ; RUN: as < %s > %t.1.bc
5 ; RUN: link %t.[12].bc | dis | grep foo | grep linkonce
66
77 declare void %foo()
0 ; This one fails because the LLVM runtime is allowing two null pointers of
11 ; the same type to be created!
22
3 ; RUN: echo "%T = type int" | as > Output/%s.2.bc
4 ; RUN: as < %s > Output/%s.1.bc
5 ; RUN: link Output/%s.[12].bc
3 ; RUN: echo "%T = type int" | as > %t.2.bc
4 ; RUN: as < %s > %t.1.bc
5 ; RUN: link %t.[12].bc
66
77 %T = type opaque
88
0 ; This one fails because the LLVM runtime is allowing two null pointers of
11 ; the same type to be created!
22
3 ; RUN: echo "%S = type { %T*} %T = type opaque" | as > Output/%s.2.bc
4 ; RUN: as < %s > Output/%s.1.bc
5 ; RUN: link Output/%s.[12].bc
3 ; RUN: echo "%S = type { %T*} %T = type opaque" | as > %t.2.bc
4 ; RUN: as < %s > %t.1.bc
5 ; RUN: link %t.[12].bc
66
77 %S = type { %T* }
88 %T = type int
22 ; a program that already has an external declaration for the function name, we must
33 ; rename the internal function to something that does not conflict.
44
5 ; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > Output/%s.1.bc
6 ; RUN: as < %s > Output/%s.2.bc
7 ; RUN: link Output/%s.[12].bc | dis | grep 'internal' | not grep '%foo('
5 ; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > %t.1.bc
6 ; RUN: as < %s > %t.2.bc
7 ; RUN: link %t.[12].bc | dis | grep 'internal' | not grep '%foo('
88
99 implementation
1010 declare int %foo()
None ; RUN: echo "%T = type opaque" | as > Output/%s.2.bc
1 ; RUN: as < %s > Output/%s.1.bc
2 ; RUN: link Output/%s.[12].bc
0 ; RUN: echo "%T = type opaque" | as > %t.2.bc
1 ; RUN: as < %s > %t.1.bc
2 ; RUN: link %t.[12].bc
33
44 %T = type opaque
55 %a = constant { %T* } { %T* null }
None ; RUN: echo "%T = type int" | as > Output/%s.1.bc
1 ; RUN: as < %s > Output/%s.2.bc
2 ; RUN: link Output/%s.[12].bc
0 ; RUN: echo "%T = type int" | as > %t.1.bc
1 ; RUN: as < %s > %t.2.bc
2 ; RUN: link %t.[12].bc
33
44 %T = type opaque
55
0 ; Test that appending linkage works correctly.
11
2 ; RUN: echo "%X = appending global [1x int] [int 8]" | as > Output/%s.2.bc
3 ; RUN: as < %s > Output/%s.1.bc
4 ; RUN: link Output/%s.[12].bc | dis | grep 7 | grep 4 | grep 8
2 ; RUN: echo "%X = appending global [1x int] [int 8]" | as > %t.2.bc
3 ; RUN: as < %s > %t.1.bc
4 ; RUN: link %t.[12].bc | dis | grep 7 | grep 4 | grep 8
55
66 %X = appending global [2 x int] [int 7, int 4]
77
0 ; Test that appending linkage works correctly when arrays are the same size.
11
2 ; RUN: echo "%X = appending global [1x int] [int 8]" | as > Output/%s.2.bc
3 ; RUN: as < %s > Output/%s.1.bc
4 ; RUN: link Output/%s.[12].bc | dis | grep 7 | grep 8
2 ; RUN: echo "%X = appending global [1x int] [int 8]" | as > %t.2.bc
3 ; RUN: as < %s > %t.1.bc
4 ; RUN: link %t.[12].bc | dis | grep 7 | grep 8
55
66 %X = appending global [1 x int] [int 7]
0 ; This fails because the linker renames the non-opaque type not the opaque
11 ; one...
22
3 ; RUN: echo "%X = linkonce global int 8" | as > Output/%s.2.bc
4 ; RUN: as < %s > Output/%s.1.bc
5 ; RUN: link Output/%s.[12].bc | dis
3 ; RUN: echo "%X = linkonce global int 8" | as > %t.2.bc
4 ; RUN: as < %s > %t.1.bc
5 ; RUN: link %t.[12].bc | dis
66
77 %X = linkonce global int 7
None ; RUN: as < %s > Output/%s.bc
1 ; RUN: as < testlink2.ll > Output/testlink2.bc
2 ; RUN: link Output/%s.bc Output/testlink2.bc
0 ; RUN: as < %s > %t.bc
1 ; RUN: as < `dirname %s`/testlink2.ll > %t2.bc
2 ; RUN: link %t.bc %t2.bc
33
44 %MyVar = external global int
55 %MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }