48 llvm::omp::Directive
id = llvm::omp::Directive::OMPD_unknown) {
64 if (
auto &spec{std::get<std::optional<OmpDirectiveSpecification>>(x.t)}) {
65 return spec->DirName();
67 return MakeName({}, llvm::omp::Directive::OMPD_section);
78 if constexpr (WrapperTrait<T>) {
79 if constexpr (std::is_same_v<T, OpenMPCancelConstruct> ||
80 std::is_same_v<T, OpenMPCancellationPointConstruct> ||
81 std::is_same_v<T, OpenMPDepobjConstruct> ||
82 std::is_same_v<T, OpenMPFlushConstruct> ||
83 std::is_same_v<T, OpenMPInteropConstruct> ||
84 std::is_same_v<T, OpenMPSimpleStandaloneConstruct> ||
85 std::is_same_v<T, OpenMPGroupprivate>) {
88 return GetOmpDirectiveName(x.v);
90 }
else if constexpr (TupleTrait<T>) {
91 if constexpr (std::is_base_of_v<OmpBlockConstruct, T>) {
92 return std::get<OmpBeginDirective>(x.t).DirName();
93 }
else if constexpr (std::is_same_v<T, OpenMPDeclarativeAllocate> ||
94 std::is_same_v<T, OpenMPExecutableAllocate>) {
95 return MakeName(std::get<Verbatim>(x.t).source, ConstructId<T>::id);
98 x.t, std::make_index_sequence<std::tuple_size_v<
decltype(x.t)>>{});
100 }
else if constexpr (UnionTrait<T>) {
101 return common::visit(
102 [](
auto &&s) {
return GetOmpDirectiveName(s); }, x.u);
108 template <
typename... Ts,
size_t... Is>
110 const std::tuple<Ts...> &t, std::index_sequence<Is...>) {
113 if (name.v == llvm::omp::Directive::OMPD_unknown) {
117 n.v == llvm::omp::Directive::OMPD_unknown &&
"Conflicting names");
120 (accumulate(GetOmpDirectiveName(std::get<Is>(t))), ...);
124 template <
typename T>
126 return GetOmpDirectiveName(x.value());