[flang-commits] [flang] [flang][OpenMP] General utility to get directive id from AST node (PR #150121)

Michael Kruse via flang-commits flang-commits at lists.llvm.org
Wed Jul 23 02:35:12 PDT 2025


https://github.com/Meinersbur commented:

Instead of using tag parameters, is it possible to instead 
```
template <typename T> OmpDirectiveName GetOmpDirectiveName(const T &x) {
  if constexpr (WrapperTrait<T>) {
    ... 
  } else 
    return MakeName();
```

This seems to better represent the logic of the tagged overloads and is less costly in terms of compile-time.


https://github.com/llvm/llvm-project/pull/150121


More information about the flang-commits mailing list