diff --git a/flang/include/flang/Common/idioms.h b/flang/include/flang/Common/idioms.h --- a/flang/include/flang/Common/idioms.h +++ b/flang/include/flang/Common/idioms.h @@ -24,7 +24,6 @@ #endif #include "visit.h" -#include "llvm/Support/Compiler.h" #include #include #include @@ -125,11 +124,11 @@ #define ENUM_CLASS(NAME, ...) \ enum class NAME { __VA_ARGS__ }; \ - LLVM_ATTRIBUTE_UNUSED static constexpr std::size_t NAME##_enumSize{[] { \ + [[maybe_unused]] static constexpr std::size_t NAME##_enumSize{[] { \ enum { __VA_ARGS__ }; \ return Fortran::common::ListItemCount{__VA_ARGS__}.value; \ }()}; \ - LLVM_ATTRIBUTE_UNUSED static inline std::string EnumToString(NAME e) { \ + [[maybe_unused]] static inline std::string EnumToString(NAME e) { \ return Fortran::common::EnumIndexToString( \ static_cast(e), #__VA_ARGS__); \ }