diff options
author | Chris Lattner <sabre@nondot.org> | 2003-04-21 21:06:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-04-21 21:06:25 +0000 |
commit | 17ae147af0592bb7e7dea0e33bf99c60f7593bd6 (patch) | |
tree | f0e65d2f7cfc5f803ea6e932bdf76c7bf05fb546 | |
parent | da3bc21076a3d30208ddeeefb41afd3e15cf7c26 (diff) | |
download | bcm5719-llvm-17ae147af0592bb7e7dea0e33bf99c60f7593bd6.tar.gz bcm5719-llvm-17ae147af0592bb7e7dea0e33bf99c60f7593bd6.zip |
New testcase
llvm-svn: 5826
-rw-r--r-- | llvm/test/Regression/Linker/2003-04-21-Linkage.ll | 15 | ||||
-rw-r--r-- | llvm/test/Regression/Linker/testlink1.ll | 6 | ||||
-rw-r--r-- | llvm/test/Regression/Linker/testlink2.ll | 4 |
3 files changed, 20 insertions, 5 deletions
diff --git a/llvm/test/Regression/Linker/2003-04-21-Linkage.ll b/llvm/test/Regression/Linker/2003-04-21-Linkage.ll new file mode 100644 index 00000000000..58493f9eceb --- /dev/null +++ b/llvm/test/Regression/Linker/2003-04-21-Linkage.ll @@ -0,0 +1,15 @@ +; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | as > Output/%s.1.bc +; RUN: as < %s > Output/%s.2.bc +; RUN: link Output/%s.[12].bc +%X = external global int + +implementation + +declare int %foo() + +void %bar() { + load int* %X + call int %foo() + ret void +} + diff --git a/llvm/test/Regression/Linker/testlink1.ll b/llvm/test/Regression/Linker/testlink1.ll index 35b6eeb6f64..898188b5c67 100644 --- a/llvm/test/Regression/Linker/testlink1.ll +++ b/llvm/test/Regression/Linker/testlink1.ll @@ -2,9 +2,9 @@ ; RUN: as < testlink2.ll > Output/testlink2.bc ; RUN: link Output/%s.bc Output/testlink2.bc -%MyVar = uninitialized global int +%MyVar = external global int %MyIntList = global { \2 *, int } { { \2, int }* null, int 17 } - uninitialized global int ; int*:0 + external global int ; int*:0 %AConst = constant int 123 @@ -25,7 +25,7 @@ begin %v1 = load int* %MyVar call void %print(int %v1) ;; Should start out 4 - %idx = getelementptr { \2 *, int }* %MyIntList, uint 0, ubyte 1 + %idx = getelementptr { \2 *, int }* %MyIntList, long 0, ubyte 1 %v2 = load int* %idx call void %print(int %v2) ;; Should start out 17 diff --git a/llvm/test/Regression/Linker/testlink2.ll b/llvm/test/Regression/Linker/testlink2.ll index f119618a902..210e847f6d7 100644 --- a/llvm/test/Regression/Linker/testlink2.ll +++ b/llvm/test/Regression/Linker/testlink2.ll @@ -3,7 +3,7 @@ ; RUN: echo %MyVar = global int 4 -%MyIntList = uninitialized global { \2 *, int } +%MyIntList = external global { \2 *, int } %AConst = constant int 123 @@ -20,7 +20,7 @@ implementation int "foo"(int %blah) begin store int %blah, int *%MyVar - %idx = getelementptr { \2 *, int } * %MyIntList, uint 0, ubyte 1 + %idx = getelementptr { \2 *, int } * %MyIntList, long 0, ubyte 1 store int 12, int* %idx %ack = load int * %0 ;; Load from the unnamed constant |