summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Utility/SelectHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Utility/SelectHelper.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Utility/SelectHelper.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/contrib/llvm/tools/lldb/source/Utility/SelectHelper.cpp b/contrib/llvm/tools/lldb/source/Utility/SelectHelper.cpp
index 805bcf2..a46213f 100644
--- a/contrib/llvm/tools/lldb/source/Utility/SelectHelper.cpp
+++ b/contrib/llvm/tools/lldb/source/Utility/SelectHelper.cpp
@@ -14,7 +14,18 @@
#define _DARWIN_UNLIMITED_SELECT
#endif
-// C Includes
+#include "lldb/Utility/SelectHelper.h"
+#include "lldb/Utility/LLDBAssert.h"
+#include "lldb/Utility/Status.h"
+#include "lldb/lldb-enumerations.h" // for ErrorType::eErrorTypePOSIX
+#include "lldb/lldb-types.h" // for socket_t
+
+#include "llvm/ADT/DenseMap.h" // for DenseMapPair, DenseMap, Dense...
+#include "llvm/ADT/Optional.h" // for Optional
+
+#include <algorithm>
+#include <chrono> // for microseconds, seconds, steady...
+
#include <errno.h>
#if defined(_WIN32)
// Define NOMINMAX to avoid macros that conflict with std::min and std::max
@@ -24,16 +35,6 @@
#include <sys/select.h>
#endif
-// C++ Includes
-#include <algorithm>
-
-// Other libraries and framework includes
-#include "llvm/ADT/SmallVector.h"
-
-// Project includes
-#include "lldb/Core/Error.h"
-#include "lldb/Utility/LLDBAssert.h"
-#include "lldb/Utility/SelectHelper.h"
SelectHelper::SelectHelper()
: m_fd_map(), m_end_time() // Infinite timeout unless
@@ -89,14 +90,14 @@ static void updateMaxFd(llvm::Optional<lldb::socket_t> &vold,
vold = std::max(*vold, vnew);
}
-lldb_private::Error SelectHelper::Select() {
- lldb_private::Error error;
+lldb_private::Status SelectHelper::Select() {
+ lldb_private::Status error;
#ifdef _MSC_VER
// On windows FD_SETSIZE limits the number of file descriptors, not their
// numeric value.
lldbassert(m_fd_map.size() <= FD_SETSIZE);
if (m_fd_map.size() > FD_SETSIZE)
- return lldb_private::Error("Too many file descriptors for select()");
+ return lldb_private::Status("Too many file descriptors for select()");
#endif
llvm::Optional<lldb::socket_t> max_read_fd;
OpenPOWER on IntegriCloud