Add some more interesting test cases for the linker
authorChris Lattner <sabre@nondot.org>
Mon, 15 Oct 2001 03:11:58 +0000 (03:11 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 15 Oct 2001 03:11:58 +0000 (03:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@816 91177308-0d34-0410-b5e6-96231b3b80d8

test/Linker/testlink1.ll
test/Linker/testlink2.ll

index 87a9e9a49399729c639b9028b5e2ad2ba4c971b5..7ec511c15a0bbc77c2cddab3ac7d43974735251d 100644 (file)
@@ -5,6 +5,9 @@
 
 %AConst    = constant int 123
 
+; Initialized to point to external %MyVar
+%MyVarPtr  = global { int * }  { int * %MyVar }
+
 declare int "foo"(int %blah)      ;; Declared in testlink2.ll
 
 declare void "print"(int %Value)
index df8d85b38126773336bf7c9f3942cb411f9d97d7..77d62f228b43e753465eb86878907cd6ab5244e2 100644 (file)
@@ -4,6 +4,9 @@
 
 %AConst    = constant int 123
 
+%MyIntListPtr = constant { {\2,int}* } { {\2,int}* %MyIntList }
+%MyVarPtr  = global { int * }  { int * %MyVar }
+
 constant int 412
 
 implementation
@@ -13,10 +16,9 @@ begin
        store int %blah, int *%MyVar
        store int 12, { \2 *, int } * %MyIntList, ubyte 1
 
-       ;%ack = load int * %0   ;; Load from the unnamed constant
-       ;%fzo = add int %ack, %blah
-       ;ret int %fzo
-       ret int %blah
+       %ack = load int * %0   ;; Load from the unnamed constant
+       %fzo = add int %ack, %blah
+       ret int %fzo
 end
 
 declare void "unimp"(float, double)