[flang-commits] [flang] [flang][OpenMP] Refactor interface of WithOmpDeclarative (PR #200876)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Wed Jun 3 04:56:51 PDT 2026
================
@@ -72,25 +72,35 @@ static void DumpList(llvm::raw_ostream &os, const char *label, const T &list) {
llvm::raw_ostream &operator<<(
llvm::raw_ostream &os, const WithOmpDeclarative &x) {
- if (x.has_ompRequires() || x.has_ompAtomicDefaultMemOrder()) {
- os << " OmpRequirements:(";
- if (const common::OmpMemoryOrderType *admo{x.ompAtomicDefaultMemOrder()}) {
- os << parser::ToLowerCaseLetters(llvm::omp::getOpenMPClauseName(
- llvm::omp::Clause::OMPC_atomic_default_mem_order))
- << '(' << parser::ToLowerCaseLetters(EnumToString(*admo)) << ')';
- if (x.has_ompRequires()) {
+ using OmpClauseSet = WithOmpDeclarative::OmpClauseSet;
+
+ auto toLower = [](std::string_view sv) {
----------------
skatrak wrote:
Nit: The benefit of an alias for this doesn't seem particularly high, but if you feel like it's worth it maybe you could make it more obvious with `const auto toLower = parser::ToLowerCaseLetters`.
https://github.com/llvm/llvm-project/pull/200876
More information about the flang-commits
mailing list