2006-12-02 05:23:10 +01:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
|
2004-11-07 07:08:43 +01:00
|
|
|
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
|
|
|
|
; RUN: diff %t1.ll %t2.ll
|
|
|
|
|
2001-06-06 22:29:01 +02:00
|
|
|
%myty = type int
|
|
|
|
%myfn = type float (int,double,uint,short)
|
2004-07-15 01:14:07 +02:00
|
|
|
type int(%myfn*)
|
2001-06-06 22:29:01 +02:00
|
|
|
type int(int)
|
2004-07-15 01:14:07 +02:00
|
|
|
type int(int(int)*)
|
2002-05-02 23:52:35 +02:00
|
|
|
|
|
|
|
%thisfuncty = type int (int) *
|
2001-06-06 22:29:01 +02:00
|
|
|
implementation
|
|
|
|
|
2002-10-07 00:43:49 +02:00
|
|
|
declare void %F(%thisfuncty, %thisfuncty, %thisfuncty)
|
|
|
|
|
2001-06-06 22:29:01 +02:00
|
|
|
; This function always returns zero
|
2002-10-07 00:43:49 +02:00
|
|
|
int %zarro(int %Func)
|
2001-06-06 22:29:01 +02:00
|
|
|
begin
|
|
|
|
Startup:
|
2002-05-02 23:52:35 +02:00
|
|
|
add int 0, 10
|
|
|
|
ret int 0
|
2001-06-06 22:29:01 +02:00
|
|
|
end
|
|
|
|
|
2002-10-07 00:43:49 +02:00
|
|
|
int %test(int)
|
2001-06-06 22:29:01 +02:00
|
|
|
begin
|
2002-10-07 00:43:49 +02:00
|
|
|
call void %F(%thisfuncty %zarro, %thisfuncty %test, %thisfuncty %foozball)
|
2001-06-06 22:29:01 +02:00
|
|
|
ret int 0
|
|
|
|
end
|
|
|
|
|
2002-10-07 00:43:49 +02:00
|
|
|
int %foozball(int)
|
2001-06-06 22:29:01 +02:00
|
|
|
begin
|
|
|
|
ret int 0
|
|
|
|
end
|
|
|
|
|