[clang] [OpenMP][CIR] Implement basic 'parallel' lowering + some clause infra (PR #172308)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 15 06:44:59 PST 2025
================
@@ -9527,7 +9527,9 @@ class OMPClauseVisitorBase {
#define GEN_CLANG_CLAUSE_CLASS
#define CLAUSE_CLASS(Enum, Str, Class) \
- RetTy Visit##Class(PTR(Class) S) { DISPATCH(Class); }
+ RetTy Visit##Class(PTR(Class) S) { \
+ return static_cast<ImplClass *>(this)->VisitOMPClause(S); \
----------------
erichkeane wrote:
Please note the consequences of this change. This means you'll NOT be able to call `OMPClauseVisitorBase::VisitOMPIfClause` (for example) directly.
However, this change DOES allow us to only partially implement a visitor (and have a 'fallback' option). Else if you didn't implement a 'visit' clause, it ended up being an infinite loop, and `VisitOMPClause` was dead code.
This change doesn't seem to have broken anything, so I suspected that the 'feature' we're 'losing' was never intended, and that this was the intended behavior.
https://github.com/llvm/llvm-project/pull/172308
More information about the cfe-commits
mailing list