blob: 6ca1be79e4617be8efc8a214d6ac997b0d09e21a [file] [log] [blame]
Tanya Lattner9bc243b2008-03-01 07:38:40 +00001; RUN: llvm-as < %s | llvm-dis > %t1.ll
Tanya Lattner3f7706b2004-11-07 06:08:43 +00002; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4
Tanya Lattner9bc243b2008-03-01 07:38:40 +00005%myty = type i32
6%myfn = type float (i32,double,i32,i16)
Chris Lattnera53616d2011-06-19 00:03:46 +00007%0 = type i32(%myfn*)
8%1 = type i32(i32)
9%2 = type i32(i32(i32)*)
Chris Lattner8fba3a02002-05-02 21:52:35 +000010
Tanya Lattner9bc243b2008-03-01 07:38:40 +000011 %thisfuncty = type i32 (i32) *
Chris Lattner00950542001-06-06 20:29:01 +000012
Tanya Lattner9bc243b2008-03-01 07:38:40 +000013declare void @F(%thisfuncty, %thisfuncty, %thisfuncty)
Chris Lattner7209bff2002-10-06 22:43:49 +000014
Tanya Lattner9bc243b2008-03-01 07:38:40 +000015define i32 @zarro(i32 %Func) {
Chris Lattner00950542001-06-06 20:29:01 +000016Startup:
Tanya Lattner9bc243b2008-03-01 07:38:40 +000017 add i32 0, 10 ; <i32>:0 [#uses=0]
18 ret i32 0
19}
Chris Lattner00950542001-06-06 20:29:01 +000020
Tanya Lattner9bc243b2008-03-01 07:38:40 +000021define i32 @test(i32) {
22 call void @F( %thisfuncty @zarro, %thisfuncty @test, %thisfuncty @foozball )
23 ret i32 0
24}
Chris Lattner00950542001-06-06 20:29:01 +000025
Tanya Lattner9bc243b2008-03-01 07:38:40 +000026define i32 @foozball(i32) {
27 ret i32 0
28}
Chris Lattner00950542001-06-06 20:29:01 +000029