forked from OSchip/llvm-project
[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:
parent
8c2406b1fc
commit
113cfa0772
|
@ -23,7 +23,7 @@
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
template <typename Callable> class LLVM_ATTRIBUTE_UNUSED_RESULT scope_exit {
|
template <typename Callable> class scope_exit {
|
||||||
Callable ExitFunction;
|
Callable ExitFunction;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -44,7 +44,7 @@ public:
|
||||||
// Interface is specified by p0052r2.
|
// Interface is specified by p0052r2.
|
||||||
template <typename Callable>
|
template <typename Callable>
|
||||||
detail::scope_exit<typename std::decay<Callable>::type>
|
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>(
|
return detail::scope_exit<typename std::decay<Callable>::type>(
|
||||||
std::forward<Callable>(F));
|
std::forward<Callable>(F));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue