From 9ee6fdf9a2347188165cb7742bc80827b49c8a73 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Sat, 22 Nov 2025 15:00:04 -0600 Subject: [PATCH] [flang][OpenMP] Move some utilities from openmp-parsers to openmp-utils, NFC --- flang/include/flang/Parser/openmp-utils.h | 10 ++++++++++ flang/lib/Parser/openmp-parsers.cpp | 24 ----------------------- flang/lib/Parser/openmp-utils.cpp | 19 ++++++++++++++++++ 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/flang/include/flang/Parser/openmp-utils.h b/flang/include/flang/Parser/openmp-utils.h index 7396e57144b90..d4b739f4c9529 100644 --- a/flang/include/flang/Parser/openmp-utils.h +++ b/flang/include/flang/Parser/openmp-utils.h @@ -126,6 +126,16 @@ const OpenMPConstruct *GetOmp(const ExecutionPartConstruct &x); const OpenMPLoopConstruct *GetOmpLoop(const ExecutionPartConstruct &x); const DoConstruct *GetDoConstruct(const ExecutionPartConstruct &x); +// Is the template argument "Statement" for some T? +template struct IsStatement { + static constexpr bool value{false}; +}; +template struct IsStatement> { + static constexpr bool value{true}; +}; + +std::optional