blob: 0f4468d41194c54790728b99f6e3058a326c7f84 [file] [log] [blame]
Chris Lattnerf2b6b022002-08-20 19:34:51 +00001; This file is used by testlink1.ll, so it doesn't actually do anything itself
2;
Reid Spencer0fb79b92007-01-27 21:08:29 +00003; RUN: true
Chris Lattner285c68d2001-10-13 07:15:38 +00004
5%MyVar = global int 4
Chris Lattner8869c2c2003-04-21 21:06:25 +00006%MyIntList = external global { \2 *, int }
Chris Lattner285c68d2001-10-13 07:15:38 +00007
8%AConst = constant int 123
9
Chris Lattnerb4b07c72001-11-26 19:17:06 +000010%Intern1 = internal constant int 52 ;; Intern in both testlink[12].ll
11%Intern2 = constant int 12345 ;; Intern in one but not in other
12
Chris Lattner230e5ef2001-10-15 03:11:58 +000013%MyIntListPtr = constant { {\2,int}* } { {\2,int}* %MyIntList }
Chris Lattnere709a212003-04-23 18:38:13 +000014%MyVarPtr = linkonce global { int * } { int * %MyVar }
Chris Lattner230e5ef2001-10-15 03:11:58 +000015
Chris Lattner784c52f2001-10-14 23:28:56 +000016constant int 412
17
Chris Lattner285c68d2001-10-13 07:15:38 +000018implementation
19
20int "foo"(int %blah)
21begin
22 store int %blah, int *%MyVar
Reid Spencere5d4efa2006-11-23 15:14:52 +000023 %idx = getelementptr { \2 *, int } * %MyIntList, long 0, uint 1
Chris Lattnerac2cbb82002-08-22 16:39:05 +000024 store int 12, int* %idx
Chris Lattner784c52f2001-10-14 23:28:56 +000025
Chris Lattner230e5ef2001-10-15 03:11:58 +000026 %ack = load int * %0 ;; Load from the unnamed constant
27 %fzo = add int %ack, %blah
28 ret int %fzo
Chris Lattner285c68d2001-10-13 07:15:38 +000029end
30
Chris Lattner784c52f2001-10-14 23:28:56 +000031declare void "unimp"(float, double)
Chris Lattnerb4b07c72001-11-26 19:17:06 +000032
33internal void "testintern"() begin ret void end
34 void "Testintern"() begin ret void end
35internal void "testIntern"() begin ret void end
36