blob: 77d62f228b43e753465eb86878907cd6ab5244e2 [file] [log] [blame]
Chris Lattner285c68d2001-10-13 07:15:38 +00001
2%MyVar = global int 4
3%MyIntList = uninitialized global { \2 *, int }
4
5%AConst = constant int 123
6
Chris Lattner230e5ef2001-10-15 03:11:58 +00007%MyIntListPtr = constant { {\2,int}* } { {\2,int}* %MyIntList }
8%MyVarPtr = global { int * } { int * %MyVar }
9
Chris Lattner784c52f2001-10-14 23:28:56 +000010constant int 412
11
Chris Lattner285c68d2001-10-13 07:15:38 +000012implementation
13
14int "foo"(int %blah)
15begin
16 store int %blah, int *%MyVar
17 store int 12, { \2 *, int } * %MyIntList, ubyte 1
Chris Lattner784c52f2001-10-14 23:28:56 +000018
Chris Lattner230e5ef2001-10-15 03:11:58 +000019 %ack = load int * %0 ;; Load from the unnamed constant
20 %fzo = add int %ack, %blah
21 ret int %fzo
Chris Lattner285c68d2001-10-13 07:15:38 +000022end
23
Chris Lattner784c52f2001-10-14 23:28:56 +000024declare void "unimp"(float, double)