diff options
author | Pavel Labath <labath@google.com> | 2017-06-22 14:18:55 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-06-22 14:18:55 +0000 |
commit | efd57a8aeceda4191348c15fb95502f496ea6a00 (patch) | |
tree | 2324fee864dba7f3df2b6ece7216c9a51e05a635 /llvm/include | |
parent | 69ffba4595590d95c2aee360f36db4742b2c606c (diff) | |
download | bcm5719-llvm-efd57a8aeceda4191348c15fb95502f496ea6a00.tar.gz bcm5719-llvm-efd57a8aeceda4191348c15fb95502f496ea6a00.zip |
Revert "[Support] Add RetryAfterSignal helper function" and subsequent fix
The fix in r306003 uncovered a pretty fundamental problem that libc++
implementation of std::result_of does not handle the prototype of
open(2) correctly (presumably because it contains ...). This makes the
whole function unusable in its current form, so I am also reverting the
original commit (r305892), which introduced the function, at least until
I figure out a way to solve the libc++ issue.
llvm-svn: 306005
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/Support/Errno.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/include/llvm/Support/Errno.h b/llvm/include/llvm/Support/Errno.h index 201b5598c02..4ce65e7dc83 100644 --- a/llvm/include/llvm/Support/Errno.h +++ b/llvm/include/llvm/Support/Errno.h @@ -16,7 +16,6 @@ #include <cerrno> #include <string> -#include <type_traits> namespace llvm { namespace sys { @@ -30,18 +29,6 @@ std::string StrError(); /// Like the no-argument version above, but uses \p errnum instead of errno. std::string StrError(int errnum); -template <typename Fun, typename... Args, - typename ResultT = std::result_of<Fun const &(const Args &...)>> -inline typename ResultT::type RetryAfterSignal(typename ResultT::type Fail, - const Fun &F, - const Args &... As) { - typename ResultT::type Res; - do - Res = F(As...); - while (Res == Fail && errno == EINTR); - return Res; -} - } // namespace sys } // namespace llvm |