@@ -119,7 +119,6 @@ bool OmpPragma::isClausePrintable(clang::OMPClause *Clause) {
119
119
case clang::OpenMPDirectiveKind::OMPD_target_parallel: {
120
120
switch (Clause->getClauseKind ()) {
121
121
// case clang::OpenMPClauseKind::OMPC_map:
122
- case clang::OpenMPClauseKind::OMPC_if:
123
122
case clang::OpenMPClauseKind::OMPC_num_threads:
124
123
case clang::OpenMPClauseKind::OMPC_default:
125
124
case clang::OpenMPClauseKind::OMPC_proc_bind:
@@ -130,12 +129,18 @@ bool OmpPragma::isClausePrintable(clang::OMPClause *Clause) {
130
129
return true ;
131
130
default :
132
131
return false ;
132
+ case clang::OpenMPClauseKind::OMPC_if:
133
+ clang::OMPIfClause* IC = llvm::dyn_cast_or_null<clang::OMPIfClause>(Clause);
134
+ if ((IC->getNameModifier ()) == clang::OpenMPDirectiveKind::OMPD_target) {
135
+ return false ;
136
+ } else {
137
+ return true ;
138
+ }
133
139
}
134
140
}
135
141
case clang::OpenMPDirectiveKind::OMPD_target_parallel_for: {
136
142
switch (Clause->getClauseKind ()) {
137
143
// case clang::OpenMPClauseKind::OMPC_map:
138
- case clang::OpenMPClauseKind::OMPC_if:
139
144
case clang::OpenMPClauseKind::OMPC_num_threads:
140
145
case clang::OpenMPClauseKind::OMPC_default:
141
146
case clang::OpenMPClauseKind::OMPC_proc_bind:
@@ -151,12 +156,18 @@ bool OmpPragma::isClausePrintable(clang::OMPClause *Clause) {
151
156
return true ;
152
157
default :
153
158
return false ;
159
+ case clang::OpenMPClauseKind::OMPC_if:
160
+ clang::OMPIfClause* IC = llvm::dyn_cast_or_null<clang::OMPIfClause>(Clause);
161
+ if ((IC->getNameModifier ()) == clang::OpenMPDirectiveKind::OMPD_target) {
162
+ return false ;
163
+ } else {
164
+ return true ;
165
+ }
154
166
}
155
167
}
156
168
case clang::OpenMPDirectiveKind::OMPD_target_parallel_for_simd: {
157
169
switch (Clause->getClauseKind ()) {
158
170
// case clang::OpenMPClauseKind::OMPC_map:
159
- case clang::OpenMPClauseKind::OMPC_if:
160
171
case clang::OpenMPClauseKind::OMPC_num_threads:
161
172
case clang::OpenMPClauseKind::OMPC_default:
162
173
case clang::OpenMPClauseKind::OMPC_proc_bind:
@@ -175,6 +186,13 @@ bool OmpPragma::isClausePrintable(clang::OMPClause *Clause) {
175
186
return true ;
176
187
default :
177
188
return false ;
189
+ case clang::OpenMPClauseKind::OMPC_if:
190
+ clang::OMPIfClause* IC = llvm::dyn_cast_or_null<clang::OMPIfClause>(Clause);
191
+ if ((IC->getNameModifier ()) == clang::OpenMPDirectiveKind::OMPD_target) {
192
+ return false ;
193
+ } else {
194
+ return true ;
195
+ }
178
196
}
179
197
}
180
198
case clang::OpenMPDirectiveKind::OMPD_target_simd: {
@@ -218,7 +236,6 @@ bool OmpPragma::isClausePrintable(clang::OMPClause *Clause) {
218
236
case clang::OpenMPClauseKind::OMPC_lastprivate:
219
237
case clang::OpenMPClauseKind::OMPC_collapse:
220
238
case clang::OpenMPClauseKind::OMPC_dist_schedule:
221
- case clang::OpenMPClauseKind::OMPC_if:
222
239
case clang::OpenMPClauseKind::OMPC_num_threads:
223
240
case clang::OpenMPClauseKind::OMPC_default:
224
241
case clang::OpenMPClauseKind::OMPC_proc_bind:
@@ -230,7 +247,14 @@ bool OmpPragma::isClausePrintable(clang::OMPClause *Clause) {
230
247
return true ;
231
248
default :
232
249
return false ;
233
- }
250
+ case clang::OpenMPClauseKind::OMPC_if:
251
+ clang::OMPIfClause* IC = llvm::dyn_cast_or_null<clang::OMPIfClause>(Clause);
252
+ if ((IC->getNameModifier ()) == clang::OpenMPDirectiveKind::OMPD_target) {
253
+ return false ;
254
+ } else {
255
+ return true ;
256
+ }
257
+ }
234
258
}
235
259
case clang::OpenMPDirectiveKind::OMPD_teams_distribute_parallel_for_simd:
236
260
case clang::OpenMPDirectiveKind::
@@ -241,7 +265,6 @@ bool OmpPragma::isClausePrintable(clang::OMPClause *Clause) {
241
265
case clang::OpenMPClauseKind::OMPC_lastprivate:
242
266
case clang::OpenMPClauseKind::OMPC_collapse:
243
267
case clang::OpenMPClauseKind::OMPC_dist_schedule:
244
- case clang::OpenMPClauseKind::OMPC_if:
245
268
case clang::OpenMPClauseKind::OMPC_num_threads:
246
269
case clang::OpenMPClauseKind::OMPC_default:
247
270
case clang::OpenMPClauseKind::OMPC_proc_bind:
@@ -257,6 +280,13 @@ bool OmpPragma::isClausePrintable(clang::OMPClause *Clause) {
257
280
return true ;
258
281
default :
259
282
return false ;
283
+ case clang::OpenMPClauseKind::OMPC_if:
284
+ clang::OMPIfClause* IC = llvm::dyn_cast_or_null<clang::OMPIfClause>(Clause);
285
+ if ((IC->getNameModifier ()) == clang::OpenMPDirectiveKind::OMPD_target) {
286
+ return false ;
287
+ } else {
288
+ return true ;
289
+ }
260
290
}
261
291
}
262
292
case clang::OpenMPDirectiveKind::OMPD_teams_distribute_simd:
@@ -279,6 +309,13 @@ bool OmpPragma::isClausePrintable(clang::OMPClause *Clause) {
279
309
return true ;
280
310
default :
281
311
return false ;
312
+ case clang::OpenMPClauseKind::OMPC_if:
313
+ clang::OMPIfClause* IC = llvm::dyn_cast_or_null<clang::OMPIfClause>(Clause);
314
+ if ((IC->getNameModifier ()) == clang::OpenMPDirectiveKind::OMPD_target) {
315
+ return false ;
316
+ } else {
317
+ return true ;
318
+ }
282
319
}
283
320
}
284
321
default :
0 commit comments