Lines Matching refs:IMPL

2 …lgen -gen-directive-impl -I %p/../../include %s | FileCheck -match-full-lines %s -check-prefix=IMPL
81 // IMPL: #ifdef GEN_FLANG_DIRECTIVE_CLAUSE_SETS
82 // IMPL-NEXT: #undef GEN_FLANG_DIRECTIVE_CLAUSE_SETS
83 // IMPL-EMPTY:
84 // IMPL-NEXT: namespace llvm {
85 // IMPL-NEXT: namespace tdl {
86 // IMPL-EMPTY:
87 // IMPL-NEXT: // Sets for dira
88 // IMPL-EMPTY:
89 // IMPL-NEXT: static allowedClauses_TDLD_dira {
90 // IMPL-NEXT: llvm::tdl::Clause::TDLC_clausea,
91 // IMPL-NEXT: llvm::tdl::Clause::TDLC_clauseb,
92 // IMPL-NEXT: };
93 // IMPL-EMPTY:
94 // IMPL-NEXT: static allowedOnceClauses_TDLD_dira {
95 // IMPL-NEXT: };
96 // IMPL-EMPTY:
97 // IMPL-NEXT: static allowedExclusiveClauses_TDLD_dira {
98 // IMPL-NEXT: };
99 // IMPL-EMPTY:
100 // IMPL-NEXT: static requiredClauses_TDLD_dira {
101 // IMPL-NEXT: };
102 // IMPL-NEXT: } // namespace tdl
103 // IMPL-NEXT: } // namespace llvm
104 // IMPL-EMPTY:
105 // IMPL-NEXT: #endif // GEN_FLANG_DIRECTIVE_CLAUSE_SETS
106 // IMPL-EMPTY:
107 // IMPL-NEXT: #ifdef GEN_FLANG_DIRECTIVE_CLAUSE_MAP
108 // IMPL-NEXT: #undef GEN_FLANG_DIRECTIVE_CLAUSE_MAP
109 // IMPL-EMPTY:
110 // IMPL-NEXT: {
111 // IMPL-NEXT: {llvm::tdl::Directive::TDLD_dira,
112 // IMPL-NEXT: {
113 // IMPL-NEXT: llvm::tdl::allowedClauses_TDLD_dira,
114 // IMPL-NEXT: llvm::tdl::allowedOnceClauses_TDLD_dira,
115 // IMPL-NEXT: llvm::tdl::allowedExclusiveClauses_TDLD_dira,
116 // IMPL-NEXT: llvm::tdl::requiredClauses_TDLD_dira,
117 // IMPL-NEXT: }
118 // IMPL-NEXT: },
119 // IMPL-NEXT: }
120 // IMPL-EMPTY:
121 // IMPL-NEXT: #endif // GEN_FLANG_DIRECTIVE_CLAUSE_MAP
122 // IMPL-EMPTY:
123 // IMPL-NEXT: #ifdef GEN_FLANG_CLAUSE_PARSER_CLASSES
124 // IMPL-NEXT: #undef GEN_FLANG_CLAUSE_PARSER_CLASSES
125 // IMPL-EMPTY:
126 // IMPL-NEXT: EMPTY_CLASS(Clausea);
127 // IMPL-NEXT: WRAPPER_CLASS(Clauseb, std::list<IntExpr>);
128 // IMPL-NEXT: WRAPPER_CLASS(Clausec, std::optional<Name>);
129 // IMPL-NEXT: EMPTY_CLASS(Claused);
130 // IMPL-EMPTY:
131 // IMPL-NEXT: #endif // GEN_FLANG_CLAUSE_PARSER_CLASSES
132 // IMPL-EMPTY:
133 // IMPL-NEXT: #ifdef GEN_FLANG_CLAUSE_PARSER_CLASSES_LIST
134 // IMPL-NEXT: #undef GEN_FLANG_CLAUSE_PARSER_CLASSES_LIST
135 // IMPL-EMPTY:
136 // IMPL-NEXT: Clausea
137 // IMPL-NEXT: , Clauseb
138 // IMPL-NEXT: , Clausec
139 // IMPL-NEXT: , Claused
140 // IMPL-EMPTY:
141 // IMPL-NEXT: #endif // GEN_FLANG_CLAUSE_PARSER_CLASSES_LIST
142 // IMPL-EMPTY:
143 // IMPL-NEXT: #ifdef GEN_FLANG_DUMP_PARSE_TREE_CLAUSES
144 // IMPL-NEXT: #undef GEN_FLANG_DUMP_PARSE_TREE_CLAUSES
145 // IMPL-EMPTY:
146 // IMPL-NEXT: NODE(TdlClause, Clausea)
147 // IMPL-NEXT: NODE(TdlClause, Clauseb)
148 // IMPL-NEXT: NODE(TdlClause, Clausec)
149 // IMPL-NEXT: NODE(TdlClause, Claused)
150 // IMPL-EMPTY:
151 // IMPL-NEXT: #endif // GEN_FLANG_DUMP_PARSE_TREE_CLAUSES
152 // IMPL-EMPTY:
153 // IMPL-NEXT: #ifdef GEN_FLANG_CLAUSE_UNPARSE
154 // IMPL-NEXT: #undef GEN_FLANG_CLAUSE_UNPARSE
155 // IMPL-EMPTY:
156 // IMPL-NEXT: void Before(const TdlClause::Clausea &) { Word("CLAUSEA"); }
157 // IMPL-NEXT: void Unparse(const TdlClause::Clauseb &x) {
158 // IMPL-NEXT: Word("CLAUSEB");
159 // IMPL-NEXT: Put("(");
160 // IMPL-NEXT: Walk(x.v, ",");
161 // IMPL-NEXT: Put(")");
162 // IMPL-NEXT: }
163 // IMPL-NEXT: void Unparse(const TdlClause::Clausec &x) {
164 // IMPL-NEXT: Word("CLAUSEC");
165 // IMPL-NEXT: Put("(");
166 // IMPL-NEXT: if (x.v.has_value())
167 // IMPL-NEXT: Walk(x.v);
168 // IMPL-NEXT: else
169 // IMPL-NEXT: Put("*");
170 // IMPL-NEXT: Put(")");
171 // IMPL-NEXT: }
172 // IMPL-NEXT: void Before(const TdlClause::Claused &) { Word("CLAUSED"); }
173 // IMPL-EMPTY:
174 // IMPL-NEXT: #endif // GEN_FLANG_CLAUSE_UNPARSE
176 // IMPL: #ifdef GEN_CLANG_CLAUSE_CLASS
177 // IMPL-NEXT: #undef GEN_CLANG_CLAUSE_CLASS
178 // IMPL-EMPTY:
179 // IMPL-NEXT: #ifndef CLAUSE
180 // IMPL-NEXT: #define CLAUSE(Enum, Str, Implicit)
181 // IMPL-NEXT: #endif
182 // IMPL-NEXT: #ifndef CLAUSE_CLASS
183 // IMPL-NEXT: #define CLAUSE_CLASS(Enum, Str, Class)
184 // IMPL-NEXT: #endif
185 // IMPL-NEXT: #ifndef CLAUSE_NO_CLASS
186 // IMPL-NEXT: #define CLAUSE_NO_CLASS(Enum, Str)
187 // IMPL-NEXT: #endif
188 // IMPL-EMPTY:
189 // IMPL-NEXT: #define __CLAUSE(Name, Class) \
190 // IMPL-NEXT: CLAUSE(TDLC_##Name, #Name, /* Implicit */ false) \
191 // IMPL-NEXT: CLAUSE_CLASS(TDLC_##Name, #Name, Class)
192 // IMPL-NEXT: #define __CLAUSE_NO_CLASS(Name) \
193 // IMPL-NEXT: CLAUSE(TDLC_##Name, #Name, /* Implicit */ false) \
194 // IMPL-NEXT: CLAUSE_NO_CLASS(TDLC_##Name, #Name)
195 // IMPL-NEXT: #define __IMPLICIT_CLAUSE_CLASS(Name, Str, Class) \
196 // IMPL-NEXT: CLAUSE(TDLC_##Name, Str, /* Implicit */ true) \
197 // IMPL-NEXT: CLAUSE_CLASS(TDLC_##Name, Str, Class)
198 // IMPL-NEXT: #define __IMPLICIT_CLAUSE_NO_CLASS(Name, Str) \
199 // IMPL-NEXT: CLAUSE(TDLC_##Name, Str, /* Implicit */ true) \
200 // IMPL-NEXT: CLAUSE_NO_CLASS(TDLC_##Name, Str)
201 // IMPL-EMPTY:
202 // IMPL-NEXT: __IMPLICIT_CLAUSE_NO_CLASS(clausea, "clausea")
203 // IMPL-NEXT: __CLAUSE_NO_CLASS(clauseb)
204 // IMPL-NEXT: __CLAUSE(clausec, ClauseC)
205 // IMPL-NEXT: __IMPLICIT_CLAUSE_CLASS(claused, "claused", ClauseD)
206 // IMPL-EMPTY:
207 // IMPL-NEXT: #undef __IMPLICIT_CLAUSE_NO_CLASS
208 // IMPL-NEXT: #undef __IMPLICIT_CLAUSE_CLASS
209 // IMPL-NEXT: #undef __CLAUSE
210 // IMPL-NEXT: #undef CLAUSE_NO_CLASS
211 // IMPL-NEXT: #undef CLAUSE_CLASS
212 // IMPL-NEXT: #undef CLAUSE
213 // IMPL-EMPTY:
214 // IMPL-NEXT: #endif // GEN_CLANG_CLAUSE_CLASS
216 // IMPL: #ifdef GEN_DIRECTIVES_IMPL
217 // IMPL-NEXT: #undef GEN_DIRECTIVES_IMPL
218 // IMPL-EMPTY:
219 // IMPL-NEXT: Directive llvm::tdl::getTdlDirectiveKind(llvm::StringRef Str) {
220 // IMPL-NEXT: return llvm::StringSwitch<Directive>(Str)
221 // IMPL-NEXT: .Case("dira",TDLD_dira)
222 // IMPL-NEXT: .Default(TDLD_dira);
223 // IMPL-NEXT: }
224 // IMPL-EMPTY:
225 // IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlDirectiveName(Directive Kind) {
226 // IMPL-NEXT: switch (Kind) {
227 // IMPL-NEXT: case TDLD_dira:
228 // IMPL-NEXT: return "dira";
229 // IMPL-NEXT: }
230 // IMPL-NEXT: llvm_unreachable("Invalid Tdl Directive kind");
231 // IMPL-NEXT: }
232 // IMPL-EMPTY:
233 // IMPL-NEXT: Clause llvm::tdl::getTdlClauseKind(llvm::StringRef Str) {
234 // IMPL-NEXT: return llvm::StringSwitch<Clause>(Str)
235 // IMPL-NEXT: .Case("clausea",TDLC_clauseb)
236 // IMPL-NEXT: .Case("clauseb",TDLC_clauseb)
237 // IMPL-NEXT: .Case("clausec",TDLC_clausec)
238 // IMPL-NEXT: .Case("claused",TDLC_clauseb)
239 // IMPL-NEXT: .Default(TDLC_clauseb);
240 // IMPL-NEXT: }
241 // IMPL-EMPTY:
242 // IMPL-NEXT: llvm::StringRef llvm::tdl::getTdlClauseName(Clause Kind) {
243 // IMPL-NEXT: switch (Kind) {
244 // IMPL-NEXT: case TDLC_clausea:
245 // IMPL-NEXT: return "clausea";
246 // IMPL-NEXT: case TDLC_clauseb:
247 // IMPL-NEXT: return "clauseb";
248 // IMPL-NEXT: case TDLC_clausec:
249 // IMPL-NEXT: return "clausec";
250 // IMPL-NEXT: case TDLC_claused:
251 // IMPL-NEXT: return "claused";
252 // IMPL-NEXT: }
253 // IMPL-NEXT: llvm_unreachable("Invalid Tdl Clause kind");
254 // IMPL-NEXT: }
255 // IMPL-EMPTY:
256 // IMPL-NEXT: bool llvm::tdl::isAllowedClauseForDirective(Directive D, Clause C, unsigned Version)…
257 // IMPL-NEXT: assert(unsigned(D) <= llvm::tdl::Directive_enumSize);
258 // IMPL-NEXT: assert(unsigned(C) <= llvm::tdl::Clause_enumSize);
259 // IMPL-NEXT: switch (D) {
260 // IMPL-NEXT: case TDLD_dira:
261 // IMPL-NEXT: switch (C) {
262 // IMPL-NEXT: case TDLC_clausea:
263 // IMPL-NEXT: return 2 <= Version && 4 >= Version;
264 // IMPL-NEXT: case TDLC_clauseb:
265 // IMPL-NEXT: return 2 <= Version && 2147483647 >= Version;
266 // IMPL-NEXT: default:
267 // IMPL-NEXT: return false;
268 // IMPL-NEXT: }
269 // IMPL-NEXT: break;
270 // IMPL-NEXT: }
271 // IMPL-NEXT: llvm_unreachable("Invalid Tdl Directive kind");
272 // IMPL-NEXT: }
273 // IMPL-EMPTY:
274 // IMPL-NEXT: #endif // GEN_DIRECTIVES_IMPL