aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Shen <timshen91@gmail.com>2016-08-10 22:35:38 +0000
committerTim Shen <timshen91@gmail.com>2016-08-10 22:35:38 +0000
commit113cfa0772d4efe006fecf040ef3ed15e31b807e (patch)
tree3b5347b4e531517a75296d4dafb47181374bfe20
parent8c2406b1fc10051d9c8d00cbb84d394b66e7d52c (diff)
downloadllvm-113cfa0772d4efe006fecf040ef3ed15e31b807e.zip
llvm-113cfa0772d4efe006fecf040ef3ed15e31b807e.tar.gz
llvm-113cfa0772d4efe006fecf040ef3ed15e31b807e.tar.bz2
[ADT] Move LLVM_ATTRIBUTE_UNUSED_RESULT to the function, otherwise gcc 4.8 complains about it.
It's a fix for the original patch r278251. llvm-svn: 278298
-rw-r--r--llvm/include/llvm/ADT/ScopeExit.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/ADT/ScopeExit.h b/llvm/include/llvm/ADT/ScopeExit.h
index 6786a61..28a1124 100644
--- a/llvm/include/llvm/ADT/ScopeExit.h
+++ b/llvm/include/llvm/ADT/ScopeExit.h
@@ -23,7 +23,7 @@
namespace llvm {
namespace detail {
-template <typename Callable> class LLVM_ATTRIBUTE_UNUSED_RESULT scope_exit {
+template <typename Callable> class scope_exit {
Callable ExitFunction;
public:
@@ -44,7 +44,7 @@ public:
// Interface is specified by p0052r2.
template <typename Callable>
detail::scope_exit<typename std::decay<Callable>::type>
-make_scope_exit(Callable &&F) {
+ LLVM_ATTRIBUTE_UNUSED_RESULT make_scope_exit(Callable &&F) {
return detail::scope_exit<typename std::decay<Callable>::type>(
std::forward<Callable>(F));
}