[PATCH] D94219: Change the LLVM_ATTRIBUTE_DEPRECATED macro to use C++14 attribute.
Christian Sigg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 03:41:24 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGace516fb33d1: Change the LLVM_ATTRIBUTE_DEPRECATED macro to use C++14 attribute. (authored by csigg).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94219/new/
https://reviews.llvm.org/D94219
Files:
llvm/include/llvm/Support/Compiler.h
Index: llvm/include/llvm/Support/Compiler.h
===================================================================
--- llvm/include/llvm/Support/Compiler.h
+++ llvm/include/llvm/Support/Compiler.h
@@ -314,19 +314,9 @@
#endif
// LLVM_ATTRIBUTE_DEPRECATED(decl, "message")
-#if __has_feature(attribute_deprecated_with_message)
-# define LLVM_ATTRIBUTE_DEPRECATED(decl, message) \
- decl __attribute__((deprecated(message)))
-#elif defined(__GNUC__)
-# define LLVM_ATTRIBUTE_DEPRECATED(decl, message) \
- decl __attribute__((deprecated))
-#elif defined(_MSC_VER)
-# define LLVM_ATTRIBUTE_DEPRECATED(decl, message) \
- __declspec(deprecated(message)) decl
-#else
-# define LLVM_ATTRIBUTE_DEPRECATED(decl, message) \
- decl
-#endif
+// This macro will be removed.
+// Use C++14's attribute instead: [[deprecated("message")]]
+#define LLVM_ATTRIBUTE_DEPRECATED(decl, message) [[deprecated(message)]] decl
/// LLVM_BUILTIN_UNREACHABLE - On compilers which support it, expands
/// to an expression which states that it is undefined behavior for the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94219.316047.patch
Type: text/x-patch
Size: 1050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210112/b07b1657/attachment.bin>
More information about the llvm-commits
mailing list