Skip to content

Commit ed67a15

Browse files
[Flang][OpenMP] Address review comments
1 parent 62fe53f commit ed67a15

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

flang/lib/Lower/OpenMP.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -791,17 +791,14 @@ class ReductionProcessor {
791791
if (!name->symbol->GetUltimate().attrs().test(
792792
Fortran::semantics::Attr::INTRINSIC))
793793
return false;
794-
auto redType = llvm::StringSwitch<std::optional<ReductionIdentifier>>(
795-
getRealName(name).ToString())
796-
.Case("max", ReductionIdentifier::MAX)
797-
.Case("min", ReductionIdentifier::MIN)
798-
.Case("iand", ReductionIdentifier::IAND)
799-
.Case("ior", ReductionIdentifier::IOR)
800-
.Case("ieor", ReductionIdentifier::IEOR)
801-
.Default(std::nullopt);
802-
if (redType)
803-
return true;
804-
return false;
794+
auto redType = llvm::StringSwitch<bool>(getRealName(name).ToString())
795+
.Case("max", true)
796+
.Case("min", true)
797+
.Case("iand", true)
798+
.Case("ior", true)
799+
.Case("ieor", true)
800+
.Default(false);
801+
return redType;
805802
}
806803

807804
static const Fortran::semantics::SourceName

0 commit comments

Comments
 (0)