2008-03-01 15:38:40 +08:00
|
|
|
; RUN: llvm-as < %s | llvm-dis > %t1.ll
|
2004-11-07 14:08:43 +08:00
|
|
|
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
|
|
|
|
; RUN: diff %t1.ll %t2.ll
|
|
|
|
|
2008-03-01 15:38:40 +08:00
|
|
|
%myty = type i32
|
|
|
|
%myfn = type float (i32,double,i32,i16)
|
|
|
|
type i32(%myfn*)
|
|
|
|
type i32(i32)
|
|
|
|
type i32(i32(i32)*)
|
2002-05-03 05:52:35 +08:00
|
|
|
|
2008-03-01 15:38:40 +08:00
|
|
|
%thisfuncty = type i32 (i32) *
|
2001-06-07 04:29:01 +08:00
|
|
|
|
2008-03-01 15:38:40 +08:00
|
|
|
declare void @F(%thisfuncty, %thisfuncty, %thisfuncty)
|
2002-10-07 06:43:49 +08:00
|
|
|
|
2008-03-01 15:38:40 +08:00
|
|
|
define i32 @zarro(i32 %Func) {
|
2001-06-07 04:29:01 +08:00
|
|
|
Startup:
|
2008-03-01 15:38:40 +08:00
|
|
|
add i32 0, 10 ; <i32>:0 [#uses=0]
|
|
|
|
ret i32 0
|
|
|
|
}
|
2001-06-07 04:29:01 +08:00
|
|
|
|
2008-03-01 15:38:40 +08:00
|
|
|
define i32 @test(i32) {
|
|
|
|
call void @F( %thisfuncty @zarro, %thisfuncty @test, %thisfuncty @foozball )
|
|
|
|
ret i32 0
|
|
|
|
}
|
2001-06-07 04:29:01 +08:00
|
|
|
|
2008-03-01 15:38:40 +08:00
|
|
|
define i32 @foozball(i32) {
|
|
|
|
ret i32 0
|
|
|
|
}
|
2001-06-07 04:29:01 +08:00
|
|
|
|