Skip to content

Commit f3cce97

Browse files
authored
[flang][OpenMP] Remove directive-specific code from GetOmpDirectiveNa… (#170157)
…me, NFC It is unnecessary, existing overloads handle these cases already.
1 parent bb06f90 commit f3cce97

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

flang/include/flang/Parser/openmp-utils.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,7 @@ struct DirectiveNameScope {
6767
template <typename T>
6868
static OmpDirectiveName GetOmpDirectiveName(const T &x) {
6969
if constexpr (WrapperTrait<T>) {
70-
if constexpr (std::is_same_v<T, OpenMPCancelConstruct> ||
71-
std::is_same_v<T, OpenMPCancellationPointConstruct> ||
72-
std::is_same_v<T, OpenMPDepobjConstruct> ||
73-
std::is_same_v<T, OpenMPFlushConstruct> ||
74-
std::is_same_v<T, OpenMPInteropConstruct> ||
75-
std::is_same_v<T, OpenMPSimpleStandaloneConstruct> ||
76-
std::is_same_v<T, OpenMPGroupprivate>) {
77-
return x.v.DirName();
78-
} else {
79-
return GetOmpDirectiveName(x.v);
80-
}
70+
return GetOmpDirectiveName(x.v);
8171
} else if constexpr (TupleTrait<T>) {
8272
if constexpr (std::is_base_of_v<OmpBlockConstruct, T>) {
8373
return std::get<OmpBeginDirective>(x.t).DirName();

0 commit comments

Comments
 (0)