Lines Matching refs:IMPL

2 …lgen -gen-directive-impl -I %p/../../include %s | FileCheck -match-full-lines %s -check-prefix=IMPL
103 // IMPL: #ifdef GEN_FLANG_DIRECTIVE_CLAUSE_SETS
104 // IMPL-NEXT: #undef GEN_FLANG_DIRECTIVE_CLAUSE_SETS
105 // IMPL-EMPTY:
106 // IMPL-NEXT: namespace llvm {
107 // IMPL-NEXT: namespace tdl {
108 // IMPL-EMPTY:
109 // IMPL-NEXT: // Sets for dira
110 // IMPL-EMPTY:
111 // IMPL-NEXT: static allowedClauses_TDLD_dira {
112 // IMPL-NEXT: llvm::tdl::Clause::TDLC_clausea,
113 // IMPL-NEXT: llvm::tdl::Clause::TDLC_clauseb,
114 // IMPL-NEXT: };
115 // IMPL-EMPTY:
116 // IMPL-NEXT: static allowedOnceClauses_TDLD_dira {
117 // IMPL-NEXT: };
118 // IMPL-EMPTY:
119 // IMPL-NEXT: static allowedExclusiveClauses_TDLD_dira {
120 // IMPL-NEXT: };
121 // IMPL-EMPTY:
122 // IMPL-NEXT: static requiredClauses_TDLD_dira {
123 // IMPL-NEXT: };
124 // IMPL-NEXT: } // namespace tdl
125 // IMPL-NEXT: } // namespace llvm
126 // IMPL-EMPTY:
127 // IMPL-NEXT: #endif // GEN_FLANG_DIRECTIVE_CLAUSE_SETS
128 // IMPL-EMPTY:
129 // IMPL-NEXT: #ifdef GEN_FLANG_DIRECTIVE_CLAUSE_MAP
130 // IMPL-NEXT: #undef GEN_FLANG_DIRECTIVE_CLAUSE_MAP
131 // IMPL-EMPTY:
132 // IMPL-NEXT: {
133 // IMPL-NEXT: {llvm::tdl::Directive::TDLD_dira,
134 // IMPL-NEXT: {
135 // IMPL-NEXT: llvm::tdl::allowedClauses_TDLD_dira,
136 // IMPL-NEXT: llvm::tdl::allowedOnceClauses_TDLD_dira,
137 // IMPL-NEXT: llvm::tdl::allowedExclusiveClauses_TDLD_dira,
138 // IMPL-NEXT: llvm::tdl::requiredClauses_TDLD_dira,
139 // IMPL-NEXT: }
140 // IMPL-NEXT: },
141 // IMPL-NEXT: }
142 // IMPL-EMPTY:
143 // IMPL-NEXT: #endif // GEN_FLANG_DIRECTIVE_CLAUSE_MAP
144 // IMPL-EMPTY:
145 // IMPL-NEXT: #ifdef GEN_FLANG_CLAUSE_PARSER_CLASSES
146 // IMPL-NEXT: #undef GEN_FLANG_CLAUSE_PARSER_CLASSES
147 // IMPL-EMPTY:
148 // IMPL-NEXT: EMPTY_CLASS(Clausea);
149 // IMPL-NEXT: WRAPPER_CLASS(Clauseb, std::optional<IntExpr>);
150 // IMPL-EMPTY:
151 // IMPL-NEXT: #endif // GEN_FLANG_CLAUSE_PARSER_CLASSES
152 // IMPL-EMPTY:
153 // IMPL-NEXT: #ifdef GEN_FLANG_CLAUSE_PARSER_CLASSES_LIST
154 // IMPL-NEXT: #undef GEN_FLANG_CLAUSE_PARSER_CLASSES_LIST
155 // IMPL-EMPTY:
156 // IMPL-NEXT: Clausea
157 // IMPL-NEXT: , Clauseb
158 // IMPL-EMPTY:
159 // IMPL-NEXT: #endif // GEN_FLANG_CLAUSE_PARSER_CLASSES_LIST
160 // IMPL-EMPTY:
161 // IMPL-NEXT: #ifdef GEN_FLANG_DUMP_PARSE_TREE_CLAUSES
162 // IMPL-NEXT: #undef GEN_FLANG_DUMP_PARSE_TREE_CLAUSES
163 // IMPL-EMPTY:
164 // IMPL-NEXT: NODE(TdlClause, Clausea)
165 // IMPL-NEXT: NODE(TdlClause, Clauseb)
166 // IMPL-EMPTY:
167 // IMPL-NEXT: #endif // GEN_FLANG_DUMP_PARSE_TREE_CLAUSES
168 // IMPL-EMPTY:
169 // IMPL-NEXT: #ifdef GEN_FLANG_CLAUSE_UNPARSE
170 // IMPL-NEXT: #undef GEN_FLANG_CLAUSE_UNPARSE
171 // IMPL-EMPTY:
172 // IMPL-NEXT: void Before(const TdlClause::Clausea &) { Word("CLAUSEA"); }
173 // IMPL-NEXT: void Unparse(const TdlClause::Clauseb &x) {
174 // IMPL-NEXT: Word("CLAUSEB");
175 // IMPL-NEXT: Walk("(", x.v, ")");
176 // IMPL-NEXT: }
177 // IMPL-EMPTY:
178 // IMPL-NEXT: #endif // GEN_FLANG_CLAUSE_UNPARSE
179 // IMPL-EMPTY:
180 // IMPL-NEXT: #ifdef GEN_FLANG_CLAUSE_CHECK_ENTER
181 // IMPL-NEXT: #undef GEN_FLANG_CLAUSE_CHECK_ENTER
182 // IMPL-EMPTY:
183 // IMPL-NEXT: void Enter(const parser::TdlClause::Clausea &);
184 // IMPL-NEXT: void Enter(const parser::TdlClause::Clauseb &);
185 // IMPL-EMPTY:
186 // IMPL-NEXT: #endif // GEN_FLANG_CLAUSE_CHECK_ENTER
187 // IMPL-EMPTY:
188 // IMPL-NEXT: #ifdef GEN_FLANG_CLAUSE_PARSER_KIND_MAP
189 // IMPL-NEXT: #undef GEN_FLANG_CLAUSE_PARSER_KIND_MAP
190 // IMPL-EMPTY:
191 // IMPL-NEXT: if constexpr (std::is_same_v<A, parser::TdlClause::Clausea>)
192 // IMPL-NEXT: return llvm::tdl::Clause::TDLC_clausea;
193 // IMPL-NEXT: if constexpr (std::is_same_v<A, parser::TdlClause::Clauseb>)
194 // IMPL-NEXT: return llvm::tdl::Clause::TDLC_clauseb;
195 // IMPL-NEXT: llvm_unreachable("Invalid Tdl Parser clause");
196 // IMPL-EMPTY:
197 // IMPL-NEXT: #endif // GEN_FLANG_CLAUSE_PARSER_KIND_MAP
198 // IMPL-EMPTY:
199 // IMPL-NEXT: #ifdef GEN_CLANG_CLAUSE_CLASS
200 // IMPL-NEXT: #undef GEN_CLANG_CLAUSE_CLASS
201 // IMPL-EMPTY:
202 // IMPL-NEXT: #ifndef CLAUSE
203 // IMPL-NEXT: #define CLAUSE(Enum, Str, Implicit)
204 // IMPL-NEXT: #endif
205 // IMPL-NEXT: #ifndef CLAUSE_CLASS
206 // IMPL-NEXT: #define CLAUSE_CLASS(Enum, Str, Class)
207 // IMPL-NEXT: #endif
208 // IMPL-NEXT: #ifndef CLAUSE_NO_CLASS
209 // IMPL-NEXT: #define CLAUSE_NO_CLASS(Enum, Str)
210 // IMPL-NEXT: #endif
211 // IMPL-EMPTY:
212 // IMPL-NEXT: #define __CLAUSE(Name, Class) \
213 // IMPL-NEXT: CLAUSE(TDLC_##Name, #Name, /* Implicit */ false) \
214 // IMPL-NEXT: CLAUSE_CLASS(TDLC_##Name, #Name, Class)
215 // IMPL-NEXT: #define __CLAUSE_NO_CLASS(Name) \
216 // IMPL-NEXT: CLAUSE(TDLC_##Name, #Name, /* Implicit */ false) \
217 // IMPL-NEXT: CLAUSE_NO_CLASS(TDLC_##Name, #Name)
218 // IMPL-NEXT: #define __IMPLICIT_CLAUSE_CLASS(Name, Str, Class) \
219 // IMPL-NEXT: CLAUSE(TDLC_##Name, Str, /* Implicit */ true) \
220 // IMPL-NEXT: CLAUSE_CLASS(TDLC_##Name, Str, Class)
221 // IMPL-NEXT: #define __IMPLICIT_CLAUSE_NO_CLASS(Name, Str) \
222 // IMPL-NEXT: CLAUSE(TDLC_##Name, Str, /* Implicit */ true) \
223 // IMPL-NEXT: CLAUSE_NO_CLASS(TDLC_##Name, Str)
224 // IMPL-EMPTY:
225 // IMPL-NEXT: __CLAUSE_NO_CLASS(clausea)
226 // IMPL-NEXT: __CLAUSE_NO_CLASS(clauseb)
227 // IMPL-EMPTY:
228 // IMPL-NEXT: #undef __IMPLICIT_CLAUSE_NO_CLASS
229 // IMPL-NEXT: #undef __IMPLICIT_CLAUSE_CLASS
230 // IMPL-NEXT: #undef __CLAUSE
231 // IMPL-NEXT: #undef CLAUSE_NO_CLASS
232 // IMPL-NEXT: #undef CLAUSE_CLASS
233 // IMPL-NEXT: #undef CLAUSE
234 // IMPL-EMPTY:
235 // IMPL-NEXT: #endif // GEN_CLANG_CLAUSE_CLASS
236 // IMPL-EMPTY:
238 // IMPL: #ifdef GEN_DIRECTIVES_IMPL
239 // IMPL-NEXT: #undef GEN_DIRECTIVES_IMPL
240 // IMPL-EMPTY:
241 // IMPL-NEXT: Directive llvm::tdl::getTdlDirectiveKind(llvm::StringRef Str) {
242 // IMPL-NEXT: return llvm::StringSwitch<Directive>(Str)
243 // IMPL-NEXT: .Case("dira",TDLD_dira)
244 // IMPL-NEXT: .Default(TDLD_dira);
245 // IMPL-NEXT: }
246 // IMPL-EMPTY:
247 // IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlDirectiveName(Directive Kind) {
248 // IMPL-NEXT: switch (Kind) {
249 // IMPL-NEXT: case TDLD_dira:
250 // IMPL-NEXT: return "dira";
251 // IMPL-NEXT: }
252 // IMPL-NEXT: llvm_unreachable("Invalid Tdl Directive kind");
253 // IMPL-NEXT: }
254 // IMPL-EMPTY:
255 // IMPL-NEXT: Clause llvm::tdl::getTdlClauseKind(llvm::StringRef Str) {
256 // IMPL-NEXT: return llvm::StringSwitch<Clause>(Str)
257 // IMPL-NEXT: .Case("clausea",TDLC_clausea)
258 // IMPL-NEXT: .Case("clauseb",TDLC_clauseb)
259 // IMPL-NEXT: .Default(TDLC_clauseb);
260 // IMPL-NEXT: }
261 // IMPL-EMPTY:
262 // IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlClauseName(Clause Kind) {
263 // IMPL-NEXT: switch (Kind) {
264 // IMPL-NEXT: case TDLC_clausea:
265 // IMPL-NEXT: return "clausea";
266 // IMPL-NEXT: case TDLC_clauseb:
267 // IMPL-NEXT: return "clauseb";
268 // IMPL-NEXT: }
269 // IMPL-NEXT: llvm_unreachable("Invalid Tdl Clause kind");
270 // IMPL-NEXT: }
271 // IMPL-EMPTY:
272 // IMPL-NEXT: AKind llvm::tdl::getAKind(llvm::StringRef Str) {
273 // IMPL-NEXT: return llvm::StringSwitch<AKind>(Str)
274 // IMPL-NEXT: .Case("vala",TDLCV_vala)
275 // IMPL-NEXT: .Case("valb",TDLCV_valb)
276 // IMPL-NEXT: .Case("valc",TDLCV_valc)
277 // IMPL-NEXT: .Default(TDLCV_valc);
278 // IMPL-NEXT: }
279 // IMPL-EMPTY:
280 // IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlAKindName(llvm::tdl::AKind x) {
281 // IMPL-NEXT: switch (x) {
282 // IMPL-NEXT: case TDLCV_vala:
283 // IMPL-NEXT: return "vala";
284 // IMPL-NEXT: case TDLCV_valb:
285 // IMPL-NEXT: return "valb";
286 // IMPL-NEXT: case TDLCV_valc:
287 // IMPL-NEXT: return "valc";
288 // IMPL-NEXT: }
289 // IMPL-NEXT: llvm_unreachable("Invalid Tdl AKind kind");
290 // IMPL-NEXT: }
291 // IMPL-EMPTY:
292 // IMPL-NEXT: bool llvm::tdl::isAllowedClauseForDirective(Directive D, Clause C, unsigned Version)…
293 // IMPL-NEXT: assert(unsigned(D) <= llvm::tdl::Directive_enumSize);
294 // IMPL-NEXT: assert(unsigned(C) <= llvm::tdl::Clause_enumSize);
295 // IMPL-NEXT: switch (D) {
296 // IMPL-NEXT: case TDLD_dira:
297 // IMPL-NEXT: switch (C) {
298 // IMPL-NEXT: case TDLC_clausea:
299 // IMPL-NEXT: return 1 <= Version && 2147483647 >= Version;
300 // IMPL-NEXT: case TDLC_clauseb:
301 // IMPL-NEXT: return 1 <= Version && 2147483647 >= Version;
302 // IMPL-NEXT: default:
303 // IMPL-NEXT: return false;
304 // IMPL-NEXT: }
305 // IMPL-NEXT: break;
306 // IMPL-NEXT: }
307 // IMPL-NEXT: llvm_unreachable("Invalid Tdl Directive kind");
308 // IMPL-NEXT: }
309 // IMPL-EMPTY:
310 // IMPL-NEXT: #endif // GEN_DIRECTIVES_IMPL