55 llvm::omp::Directive
id = llvm::omp::Directive::OMPD_unknown) {
71 if (
auto &spec{std::get<std::optional<OmpDirectiveSpecification>>(x.t)}) {
72 return spec->DirName();
74 return MakeName({}, llvm::omp::Directive::OMPD_section);
85 if constexpr (WrapperTrait<T>) {
86 if constexpr (std::is_same_v<T, OpenMPCancelConstruct> ||
87 std::is_same_v<T, OpenMPCancellationPointConstruct> ||
88 std::is_same_v<T, OpenMPDepobjConstruct> ||
89 std::is_same_v<T, OpenMPFlushConstruct> ||
90 std::is_same_v<T, OpenMPInteropConstruct> ||
91 std::is_same_v<T, OpenMPSimpleStandaloneConstruct> ||
92 std::is_same_v<T, OpenMPGroupprivate>) {
95 return GetOmpDirectiveName(x.v);
97 }
else if constexpr (TupleTrait<T>) {
98 if constexpr (std::is_base_of_v<OmpBlockConstruct, T>) {
99 return std::get<OmpBeginDirective>(x.t).DirName();
100 }
else if constexpr (std::is_same_v<T, OpenMPDeclarativeAllocate> ||
101 std::is_same_v<T, OpenMPExecutableAllocate>) {
102 return MakeName(std::get<Verbatim>(x.t).source, ConstructId<T>::id);
105 x.t, std::make_index_sequence<std::tuple_size_v<
decltype(x.t)>>{});
107 }
else if constexpr (UnionTrait<T>) {
108 return common::visit(
109 [](
auto &&s) {
return GetOmpDirectiveName(s); }, x.u);
115 template <
typename... Ts,
size_t... Is>
117 const std::tuple<Ts...> &t, std::index_sequence<Is...>) {
120 if (name.v == llvm::omp::Directive::OMPD_unknown) {
124 n.v == llvm::omp::Directive::OMPD_unknown &&
"Conflicting names");
127 (accumulate(GetOmpDirectiveName(std::get<Is>(t))), ...);
131 template <
typename T>
133 return GetOmpDirectiveName(x.value());