[flang-commits] [PATCH] D78356: [flang] Replace ATTRIBUTE_UNUSED with LLVM_ATTRIBUTE_UNUSED.

Richard Barton via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Jun 25 11:56:06 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4198874630be: [flang] Replace ATTRIBUTE_UNUSED with LLVM_ATTRIBUTE_UNUSED (authored by ChinouneMehdi, committed by richard.barton.arm).

Changed prior to commit:
  https://reviews.llvm.org/D78356?vs=261273&id=273476#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78356/new/

https://reviews.llvm.org/D78356

Files:
  flang/include/flang/Common/idioms.h


Index: flang/include/flang/Common/idioms.h
===================================================================
--- flang/include/flang/Common/idioms.h
+++ flang/include/flang/Common/idioms.h
@@ -23,6 +23,7 @@
 #error g++ >= 7.2 is required
 #endif
 
+#include "llvm/Support/Compiler.h"
 #include <functional>
 #include <list>
 #include <optional>
@@ -108,10 +109,6 @@
   } \
   template <typename A> constexpr bool T{class_trait_ns_##T::trait_value<A>()};
 
-#if !defined ATTRIBUTE_UNUSED && (__clang__ || __GNUC__)
-#define ATTRIBUTE_UNUSED __attribute__((unused))
-#endif
-
 // Define enum class NAME with the given enumerators, a static
 // function EnumToString() that maps enumerators to std::string,
 // and a constant NAME_enumSize that captures the number of items
@@ -126,11 +123,11 @@
 
 #define ENUM_CLASS(NAME, ...) \
   enum class NAME { __VA_ARGS__ }; \
-  ATTRIBUTE_UNUSED static constexpr std::size_t NAME##_enumSize{[] { \
+  LLVM_ATTRIBUTE_UNUSED static constexpr std::size_t NAME##_enumSize{[] { \
     enum { __VA_ARGS__ }; \
     return Fortran::common::ListItemCount{__VA_ARGS__}.value; \
   }()}; \
-  ATTRIBUTE_UNUSED static inline std::string EnumToString(NAME e) { \
+  LLVM_ATTRIBUTE_UNUSED static inline std::string EnumToString(NAME e) { \
     return Fortran::common::EnumIndexToString( \
         static_cast<int>(e), #__VA_ARGS__); \
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78356.273476.patch
Type: text/x-patch
Size: 1371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20200625/30bcf179/attachment.bin>


More information about the flang-commits mailing list