summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/docs/ReleaseNotes.rst4
-rw-r--r--llvm/include/llvm/Support/Compiler.h9
2 files changed, 4 insertions, 9 deletions
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index 286cb8f316c..b6dfc3d96c7 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -41,6 +41,10 @@ Non-comprehensive list of changes in this release
functionality, or simply have a lot to talk about), see the `NOTE` below
for adding a new subsection.
+* The definition and uses of LLVM_ATRIBUTE_UNUSED_RESULT in the LLVM source
+ were replaced with LLVM_NODISCARD, which matches the C++17 [[nodiscard]]
+ semantics rather than gcc's __attribute__((warn_unused_result)).
+
* ... next change ...
.. NOTE
diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index c6e8875d8b8..eebf59aba61 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -130,15 +130,6 @@
#define LLVM_ATTRIBUTE_USED
#endif
-/// LLVM_ATTRIBUTE_UNUSED_RESULT - Deprecated. Use LLVM_NODISCARD instead.
-#if __has_attribute(warn_unused_result) || LLVM_GNUC_PREREQ(3, 4, 0)
-#define LLVM_ATTRIBUTE_UNUSED_RESULT __attribute__((__warn_unused_result__))
-#elif defined(_MSC_VER)
-#define LLVM_ATTRIBUTE_UNUSED_RESULT _Check_return_
-#else
-#define LLVM_ATTRIBUTE_UNUSED_RESULT
-#endif
-
/// LLVM_NODISCARD - Warn if a type or return value is discarded.
#if __cplusplus > 201402L && __has_cpp_attribute(nodiscard)
#define LLVM_NODISCARD [[nodiscard]]
OpenPOWER on IntegriCloud