Unverified Commit 564035ed authored by Krzysztof Parzyszek's avatar Krzysztof Parzyszek Committed by GitHub
Browse files

[flang][OpenMP] Organize `genOMP` functions in OpenMP.cpp, NFC (#86309)

Put all of the genOMP functions together, organize them in two groups:
for declarative constructs and for other (executable) constructs.

Replace visit functions for OpenMPDeclarativeConstruct and
OpenMPConstruct from listing individual visitors for each variant
alternative to using a single generic visitor. Essentially, going from
```
  std::visit(
    [](foo x) { genOMP(foo); }
    [](bar x) { TODO }
    [](baz x) { genOMP(baz); }
  )
```
to
```
void genOMP(bar x) {  // Separate visitor for an unhandled case
  TODO
}

[...]
  std::visit([&](auto &&s) { genOMP(s); })  // generic
```

This doesn't change any functionality, just reorganizes the functions a
bit. The intent here is to improve the readability of this file.
parent 06cfbe3c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment