Update LLVM tests to use new pointer indexing, and remove unsized array test support
[oota-llvm.git] / test / Feature / opaquetypes.ll
1 ; This test case is used to test opaque type processing, forward references,
2 ; and recursive types.  Oh my.
3
4
5 %SQ1 = type { int }
6 %ITy = type opaque
7 %SQ2 = type { %ITy }
8 %ITy = type int
9
10
11 %CCC = type { \2* }
12 %BBB = type { \2*, \2 * }
13 %AAA = type { \2*, {\2*}, [12x{\2*}], {[1x{\2*}]} }
14
15 ; Test numbered types
16 type %CCC
17 type %BBB
18 %Composite = type { %0, %1 }
19
20 ; Test simple opaque type resolution...
21 %intty = type opaque
22 %intty = type int
23
24 ; Perform a simple forward reference...
25 %ty1 = type { %ty2, int }
26 %ty2 = type float
27
28 ; Do a recursive type...
29 %list = type { %list * }
30 %listp = type { %listp } *
31
32 ; Do two mutually recursive types...
33 %TyA = type { %ty2, %TyB * }
34 %TyB = type { double, %TyA * }
35
36 ; A complex recursive type...
37 %Y = type { {%Y*}, %Y* }
38 %Z = type { { %Z * }, [12x%Z] *, {{{ %Z * }}} }
39
40 ; More ridiculous test cases...
41 %A = type [ 123x %A*]
42 %M = type %M (%M, %M) *
43 %P = type %P*
44
45 ; Recursive ptrs
46 %u = type %v*
47 %v = type %u*
48
49 ; Test the parser for unnamed recursive types...
50 %P1 = type \1 *
51 %Y1 = type { { \3 * }, \2 * }
52 %Z1 = type { { \3 * }, [12x\3] *, { { { \5 * } } } }
53
54 implementation
55
56
57