[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278298 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Shen 2016-08-10 22:35:38 +00:00
parent 9aa5ced240
commit 006d0e79fb

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