llvm-project/llvm/lib
Pavel Labath fe09f506b6 Recommit "[Support] Add RetryAfterSignal helper function"
The difference from the previous version is the use of decltype, as the
implementation of std::result_of in libc++ did not work correctly for
variadic function like open(2).

Original summary:
This function retries an operation if it was interrupted by a signal
(failed with EINTR). It's inspired by the TEMP_FAILURE_RETRY macro in
glibc, but I've turned that into a template function. I've also added a
fail-value argument, to enable the function to be used with e.g.
fopen(3), which is documented to fail for any reason that open(2) can
fail (which includes EINTR).

The main user of this function will be lldb, but there were also a
couple of uses within llvm that I could simplify using this function.

Reviewers: zturner, silvas, joerg

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D33895

llvm-svn: 306671
2017-06-29 13:15:31 +00:00
..
Analysis Fix a typo. 2017-06-28 21:10:31 +00:00
AsmParser Add dependency from AsmParser to BinaryFormat. 2017-06-07 04:24:33 +00:00
BinaryFormat [BinaryFormat] Identify AArch64 COFF files 2017-06-29 06:30:56 +00:00
Bitcode Add missing library dependency. 2017-06-28 00:05:27 +00:00
CodeGen Fold fneg and fabs like multiplications 2017-06-28 20:25:50 +00:00
DebugInfo [CodeView] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-29 00:05:44 +00:00
Demangle [ItaniumDemangle] Fix a exponential string copying bug 2017-05-28 23:24:52 +00:00
ExecutionEngine [ORC] Re-apply r306166 and r306168 with fix for regression test. 2017-06-23 23:25:28 +00:00
Fuzzer [libFuzzer] change the default max_len from 64 to 4096. This will affect cases where libFuzzer is run w/o initial corpus or with a corpus of very small items. 2017-06-15 22:43:40 +00:00
IR [Constants] Fix copy-pasto in llvm_unreachable message. NFC 2017-06-27 19:57:51 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO [ThinLTO] Remove unnecessary include of Linker.h (NFC) 2017-06-22 16:18:48 +00:00
LineEditor
Linker Support for taking the max of module flags when linking, use for PIE/PIC 2017-05-23 00:08:00 +00:00
MC [WebAssembly] Add data size and alignement to linking section 2017-06-27 20:27:59 +00:00
Object Revert "Replace trivial use of external rc.exe by writing our own .res file." 2017-06-29 00:17:26 +00:00
ObjectYAML [WebAssembly] Add data size and alignement to linking section 2017-06-27 20:27:59 +00:00
Option [GSoC] Flag value completion for clang 2017-06-20 16:31:31 +00:00
Passes Create inliner params based on size and opt levels. 2017-06-28 13:33:49 +00:00
ProfileData llvm-profdata: Indirect infrequently used fields to reduce memory usage 2017-06-29 02:51:58 +00:00
Support Recommit "[Support] Add RetryAfterSignal helper function" 2017-06-29 13:15:31 +00:00
TableGen [BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-16 00:43:26 +00:00
Target [GlobalISel][X86] Support vector type G_MERGE_VALUES selection. 2017-06-29 12:08:28 +00:00
Testing Mark LLVMTestingSupport as not installed in LLVMBuild. 2017-06-19 22:01:50 +00:00
ToolDrivers [GSoC] Flag value completion for clang 2017-06-20 16:31:31 +00:00
Transforms [SLPVectorizer] Introducing getTreeEntry() helper function [NFC] 2017-06-29 08:46:18 +00:00
XRay Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
CMakeLists.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00
LLVMBuild.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00