a894c3d2a3afd6684f730e7528f6a37b4772145a
[oota-llvm.git] / test / Feature / testconstants.ll
1 %somestr = constant [sbyte] c"hello world"
2 %somestr = constant [11x sbyte] c"hello world"
3 %array   = constant [[2 x int]]  [ [2 x int] [ int 12, int 52 ] ]
4            constant { int, int } { int 4, int 3 }
5
6 implementation
7  
8 [[2 x int]]* "test function"(int %i0, int %j0)
9 begin
10         ret [[2x int]]* %array
11 end
12
13 [sbyte]* "other func"(int, double)
14 begin
15         ret [sbyte]* %somestr
16 end
17
18 [sbyte]* "yet another func"(int, double)
19 begin
20         ret [sbyte]* null            ; Test null
21 end
22
23
24 [sbyte]* "again"(float)
25 begin
26         %cast = cast [11x sbyte]* %somestr to [sbyte]*
27         ret [sbyte]* %cast
28 end
29