2004-11-07 07:08:43 +01:00
|
|
|
; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
|
|
|
|
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
|
|
|
|
; RUN: diff %t1.ll %t2.ll
|
|
|
|
|
2001-09-18 06:38:50 +02:00
|
|
|
%somestr = constant [11x sbyte] c"hello world"
|
2001-12-14 17:46:53 +01:00
|
|
|
%array = constant [2 x int] [ int 12, int 52 ]
|
2001-09-18 06:38:50 +02:00
|
|
|
constant { int, int } { int 4, int 3 }
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
2002-05-23 00:28:27 +02:00
|
|
|
[2 x int]* %testfunction(int %i0, int %j0)
|
2001-09-18 06:38:50 +02:00
|
|
|
begin
|
2001-12-14 17:46:53 +01:00
|
|
|
ret [2x int]* %array
|
2001-09-18 06:38:50 +02:00
|
|
|
end
|
|
|
|
|
2002-05-23 00:28:27 +02:00
|
|
|
sbyte* %otherfunc(int, double)
|
2001-09-18 06:38:50 +02:00
|
|
|
begin
|
2002-10-07 00:43:49 +02:00
|
|
|
%somestr = getelementptr [11x sbyte]* %somestr, long 0, long 0
|
2001-12-14 17:46:53 +01:00
|
|
|
ret sbyte* %somestr
|
2001-09-18 06:38:50 +02:00
|
|
|
end
|
|
|
|
|
2002-05-23 00:28:27 +02:00
|
|
|
sbyte* %yetanotherfunc(int, double)
|
2001-10-01 00:47:06 +02:00
|
|
|
begin
|
2001-12-14 17:46:53 +01:00
|
|
|
ret sbyte* null ; Test null
|
2001-09-18 06:38:50 +02:00
|
|
|
end
|
2001-10-01 00:47:06 +02:00
|
|
|
|