2004-11-07 06:08:43 +00: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 04:38:50 +00:00
|
|
|
%somestr = constant [11x sbyte] c"hello world"
|
2001-12-14 16:46:53 +00:00
|
|
|
%array = constant [2 x int] [ int 12, int 52 ]
|
2001-09-18 04:38:50 +00:00
|
|
|
constant { int, int } { int 4, int 3 }
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
2002-05-22 22:28:27 +00:00
|
|
|
[2 x int]* %testfunction(int %i0, int %j0)
|
2001-09-18 04:38:50 +00:00
|
|
|
begin
|
2001-12-14 16:46:53 +00:00
|
|
|
ret [2x int]* %array
|
2001-09-18 04:38:50 +00:00
|
|
|
end
|
|
|
|
|
2002-05-22 22:28:27 +00:00
|
|
|
sbyte* %otherfunc(int, double)
|
2001-09-18 04:38:50 +00:00
|
|
|
begin
|
2002-10-06 22:43:49 +00:00
|
|
|
%somestr = getelementptr [11x sbyte]* %somestr, long 0, long 0
|
2001-12-14 16:46:53 +00:00
|
|
|
ret sbyte* %somestr
|
2001-09-18 04:38:50 +00:00
|
|
|
end
|
|
|
|
|
2002-05-22 22:28:27 +00:00
|
|
|
sbyte* %yetanotherfunc(int, double)
|
2001-09-30 22:47:06 +00:00
|
|
|
begin
|
2001-12-14 16:46:53 +00:00
|
|
|
ret sbyte* null ; Test null
|
2001-09-18 04:38:50 +00:00
|
|
|
end
|
2001-09-30 22:47:06 +00:00
|
|
|
|