summaryrefslogtreecommitdiff
path: root/flang/lib/Lower/IterationSpace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'flang/lib/Lower/IterationSpace.cpp')
-rw-r--r--flang/lib/Lower/IterationSpace.cpp39
1 files changed, 20 insertions, 19 deletions
diff --git a/flang/lib/Lower/IterationSpace.cpp b/flang/lib/Lower/IterationSpace.cpp
index 6bf310b5cfb7..930353640383 100644
--- a/flang/lib/Lower/IterationSpace.cpp
+++ b/flang/lib/Lower/IterationSpace.cpp
@@ -21,14 +21,14 @@
unsigned Fortran::lower::getHashValue(
const Fortran::lower::ExplicitIterSpace::ArrayBases &x) {
- return std::visit(
+ return Fortran::common::visit(
[&](const auto *p) { return HashEvaluateExpr::getHashValue(*p); }, x);
}
bool Fortran::lower::isEqual(
const Fortran::lower::ExplicitIterSpace::ArrayBases &x,
const Fortran::lower::ExplicitIterSpace::ArrayBases &y) {
- return std::visit(
+ return Fortran::common::visit(
Fortran::common::visitors{
// Fortran::semantics::Symbol * are the exception here. These pointers
// have identity; if two Symbol * values are the same (different) then
@@ -169,7 +169,7 @@ private:
}
template <typename... A>
RT find(const std::variant<A...> &u) {
- return std::visit([&](const auto &v) { return find(v); }, u);
+ return Fortran::common::visit([&](const auto &v) { return find(v); }, u);
}
template <typename A>
RT find(const std::vector<A> &x) {
@@ -361,22 +361,23 @@ llvm::raw_ostream &
Fortran::lower::operator<<(llvm::raw_ostream &s,
const Fortran::lower::ExplicitIterSpace &e) {
auto dump = [&](const auto &u) {
- std::visit(Fortran::common::visitors{
- [&](const Fortran::semantics::Symbol *y) {
- s << " " << *y << '\n';
- },
- [&](const Fortran::evaluate::ArrayRef *y) {
- s << " ";
- if (y->base().IsSymbol())
- s << y->base().GetFirstSymbol();
- else
- s << y->base().GetComponent().GetLastSymbol();
- s << '\n';
- },
- [&](const Fortran::evaluate::Component *y) {
- s << " " << y->GetLastSymbol() << '\n';
- }},
- u);
+ Fortran::common::visit(
+ Fortran::common::visitors{
+ [&](const Fortran::semantics::Symbol *y) {
+ s << " " << *y << '\n';
+ },
+ [&](const Fortran::evaluate::ArrayRef *y) {
+ s << " ";
+ if (y->base().IsSymbol())
+ s << y->base().GetFirstSymbol();
+ else
+ s << y->base().GetComponent().GetLastSymbol();
+ s << '\n';
+ },
+ [&](const Fortran::evaluate::Component *y) {
+ s << " " << y->GetLastSymbol() << '\n';
+ }},
+ u);
};
s << "LHS bases:\n";
for (const std::optional<Fortran::lower::ExplicitIterSpace::ArrayBases> &u :