prep-region-processing.td
2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// RUN: llvm-tblgen -I %p %s 2>&1 | FileCheck %s --implicit-check-not warning:
class C;
// TableGen prints records in alphabetical order.
// CHECK-NOT: def ifdef_disabled1
// CHECK-NOT: def ifdef_disabled2
// CHECK: def ifdef_disabled3
// CHECK-NOT: def ifdef_disabled4
// CHECK-NOT: def ifdef_disabled5
// CHECK: def ifdef_disabled4_else
// CHECK-NOT: def ifdef_disabled5_else
// CHECK: def ifdef_enabled1
// CHECK-NOT: def ifdef_enabled2
// CHECK: def ifdef_enabled3
// CHECK: def ifdef_enabled4
// CHECK-NOT: def ifdef_enabled4_else
// CHECK: def ifdef_enabled5
// CHECK: def ifdef_enabled6
// CHECK-NOT: def ifdef_enabled6_else
// CHECK-NOT: def ifdef_disabled6
// CHECK-NOT: def ifdef_disabled6_else
#define ENABLED1
#define ENABLED2
#ifdef DISABLED1
//
def ifdef_disabled1 : C;
#define DISABLED2/*This one is disabled,
because DISABLED1 is.
*/
#endif
#ifdef ENABLED1
def ifdef_enabled1 : C;
#endif
#ifdef DISABLED2/*
*/
def ifdef_disabled2 : C;
#endif
/*
#ifdef ENABLED2
def ifdef_enabled2 : C;
#endif
*/
//#ifdef DISABLED3
def ifdef_disabled3 : C;
//#endif
/* _DISABLED4 */ /* padding */ #ifdef _DISABLED4
def ifdef_disabled4 : C;
#else// /*!_DISABLED4
def ifdef_disabled4_else : C;
#define ENABLED3
#endif
#ifdef __DISABLED5
def ifdef_disabled5 : C;
/*
*/#else
#ifdef ENABLED3
def ifdef_enabled3 : C;
#else /* //!ENABLED3
*/
def ifdef_disabled5_else : C;
#endif
#endif
#define ENABLED4
include "prep-region-include.inc"//ENABLED5 is defined inside
#ifdef ENABLED5
def ifdef_enabled5 : C;
#endif // ENABLED5
#ifdef DISABLED6__
// Double inclusion is an error.
include "prep-region-include.inc"
#else
#endif
#ifdef DIS
#ifdef DIS
#ifdef DIS
#ifdef DIS
#ifdef DIS
#ifdef DIS
#ifdef DIS
#ifdef DIS
#ifdef DIS
#ifdef DIS
#ifdef DIS
def ifdef_disabled6 : C;
#endif
#endif
#endif
#endif
#else
def ifdef_disabled6_else : C;
#endif
#endif
#endif
#endif
#endif
#endif
#else
#define ENAB//ENAB
#endif
#ifdef ENAB
#ifdef ENAB
#ifdef ENAB
#ifdef ENAB
#ifdef ENAB
#ifdef ENAB
#ifdef ENAB
#ifdef ENAB
#ifdef ENAB
#ifdef ENAB
#ifdef ENAB
def ifdef_enabled6 : C;
#endif
#endif
#endif
#endif
#else
def ifdef_enabled6_else : C;
#endif
#endif
#endif
#endif
#endif
#endif
#endif
#ifdef DISABLED_7
include "non-existent-file.inc"
#endif
#ifdef DISABLED_8
\\\\\ invalid TD text /////
#endif // DISABLED_8