2001-09-10 09:58:01 +02:00
|
|
|
|
2001-09-18 06:38:50 +02:00
|
|
|
%MyVar = uninitialized global int
|
|
|
|
%MyIntList = uninitialized global { \2 *, int }
|
2002-10-07 00:32:38 +02:00
|
|
|
external global int ; int*:0
|
2001-09-18 06:38:50 +02:00
|
|
|
|
|
|
|
%AConst = constant int 123
|
2001-09-10 09:58:01 +02:00
|
|
|
|
2001-10-15 01:13:45 +02:00
|
|
|
%AString = constant [4 x ubyte] c"test"
|
|
|
|
|
2003-06-28 22:01:03 +02:00
|
|
|
%ZeroInit = global { [100 x int ], [40 x float ] } { [100 x int] zeroinitializer,
|
|
|
|
[40 x float] zeroinitializer }
|
|
|
|
|
2001-09-10 09:58:01 +02:00
|
|
|
implementation
|
|
|
|
|
|
|
|
int "foo"(int %blah)
|
|
|
|
begin
|
|
|
|
store int 5, int *%MyVar
|
2002-10-07 00:32:38 +02:00
|
|
|
%idx = getelementptr { \2 *, int } * %MyIntList, long 0, ubyte 1
|
2002-08-22 18:04:03 +02:00
|
|
|
store int 12, int* %idx
|
2001-10-15 01:13:45 +02:00
|
|
|
ret int %blah
|
2001-09-10 09:58:01 +02:00
|
|
|
end
|
|
|
|
|