[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
This commit is contained in:
Tim Shen 2016-08-10 22:35:38 +00:00
parent 8c2406b1fc
commit 113cfa0772
1 changed files with 2 additions and 2 deletions

View File

@ -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));
}