[flang-commits] [flang] [flang] Remove GCC 7.2 workarounds (PR #73574)
Brad Smith via flang-commits
flang-commits at lists.llvm.org
Mon Nov 27 14:14:54 PST 2023
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/73574
The minimum GCC version was bumped from 7.1 to 7.4 so garbage collect
the 7.2 workarounds.
https://reviews.llvm.org/D156286
>From 7d818d5b25f8a0996124aa1a5901dd88abcb1eb4 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Mon, 27 Nov 2023 17:06:49 -0500
Subject: [PATCH] [flang] Remove GCC 7.2 workarounds
The minimum GCC version was bumped from 7.1 to 7.4 so garbage collect
the 7.2 workarounds.
https://reviews.llvm.org/D156286
---
flang/lib/Evaluate/variable.cpp | 12 ------------
flang/lib/Semantics/symbol.cpp | 12 ------------
2 files changed, 24 deletions(-)
diff --git a/flang/lib/Evaluate/variable.cpp b/flang/lib/Evaluate/variable.cpp
index 29483b103054c83..b184240a7423246 100644
--- a/flang/lib/Evaluate/variable.cpp
+++ b/flang/lib/Evaluate/variable.cpp
@@ -568,12 +568,6 @@ template <typename T> BaseObject Designator<T>::GetBaseObject() const {
[](SymbolRef symbol) { return BaseObject{symbol}; },
[](const Substring &sstring) { return sstring.GetBaseObject(); },
[](const auto &x) {
-#if !__clang__ && __GNUC__ == 7 && __GNUC_MINOR__ == 2
- if constexpr (std::is_same_v<std::decay_t<decltype(x)>,
- Substring>) {
- return x.GetBaseObject();
- } else
-#endif
return BaseObject{x.GetFirstSymbol()};
},
},
@@ -586,12 +580,6 @@ template <typename T> const Symbol *Designator<T>::GetLastSymbol() const {
[](SymbolRef symbol) { return &*symbol; },
[](const Substring &sstring) { return sstring.GetLastSymbol(); },
[](const auto &x) {
-#if !__clang__ && __GNUC__ == 7 && __GNUC_MINOR__ == 2
- if constexpr (std::is_same_v<std::decay_t<decltype(x)>,
- Substring>) {
- return x.GetLastSymbol();
- } else
-#endif
return &x.GetLastSymbol();
},
},
diff --git a/flang/lib/Semantics/symbol.cpp b/flang/lib/Semantics/symbol.cpp
index 2ce8e83e4771467..2eae96af0623d7b 100644
--- a/flang/lib/Semantics/symbol.cpp
+++ b/flang/lib/Semantics/symbol.cpp
@@ -736,19 +736,7 @@ std::string GenericKind::ToString() const {
common::visitors {
[](const OtherKind &x) { return std::string{EnumToString(x)}; },
[](const common::DefinedIo &x) { return AsFortran(x).ToString(); },
-#if !__clang__ && __GNUC__ == 7 && __GNUC_MINOR__ == 2
- [](const common::NumericOperator &x) {
- return std::string{common::EnumToString(x)};
- },
- [](const common::LogicalOperator &x) {
- return std::string{common::EnumToString(x)};
- },
- [](const common::RelationalOperator &x) {
- return std::string{common::EnumToString(x)};
- },
-#else
[](const auto &x) { return std::string{common::EnumToString(x)}; },
-#endif
},
u);
}
More information about the flang-commits
mailing list