blob: 4569ee2b30b76d8306508d7ddc21aefc41b64c3b [file] [log] [blame]
Tanya Lattner3f7706b2004-11-07 06:08:43 +00001; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4
Chris Lattner00950542001-06-06 20:29:01 +00005 %myty = type int
6 %myfn = type float (int,double,uint,short)
Chris Lattner6c142302004-07-14 23:14:07 +00007 type int(%myfn*)
Chris Lattner00950542001-06-06 20:29:01 +00008 type int(int)
Chris Lattner6c142302004-07-14 23:14:07 +00009 type int(int(int)*)
Chris Lattner8fba3a02002-05-02 21:52:35 +000010
11 %thisfuncty = type int (int) *
Chris Lattner00950542001-06-06 20:29:01 +000012implementation
13
Chris Lattner7209bff2002-10-06 22:43:49 +000014declare void %F(%thisfuncty, %thisfuncty, %thisfuncty)
15
Chris Lattner00950542001-06-06 20:29:01 +000016; This function always returns zero
Chris Lattner7209bff2002-10-06 22:43:49 +000017int %zarro(int %Func)
Chris Lattner00950542001-06-06 20:29:01 +000018begin
19Startup:
Chris Lattner8fba3a02002-05-02 21:52:35 +000020 add int 0, 10
21 ret int 0
Chris Lattner00950542001-06-06 20:29:01 +000022end
23
Chris Lattner7209bff2002-10-06 22:43:49 +000024int %test(int)
Chris Lattner00950542001-06-06 20:29:01 +000025begin
Chris Lattner7209bff2002-10-06 22:43:49 +000026 call void %F(%thisfuncty %zarro, %thisfuncty %test, %thisfuncty %foozball)
Chris Lattner00950542001-06-06 20:29:01 +000027 ret int 0
28end
29
Chris Lattner7209bff2002-10-06 22:43:49 +000030int %foozball(int)
Chris Lattner00950542001-06-06 20:29:01 +000031begin
32 ret int 0
33end
34