zturner added inline comments.

================
Comment at: source/Host/common/MainLoop.cpp:135
+
+template <typename F> void MainLoop::RunImpl::ForEachReadFD(F &&f) {
+  assert(num_events >= 0);
----------------
Why do we need this function?  Just have a function that returns an 
`ArrayRef<int>` and let the caller iterate over it themselves.


================
Comment at: source/Host/common/MainLoop.cpp:143
+}
+template <typename F> void MainLoop::RunImpl::ForEachSignal(F && f) {}
+#else
----------------
Same here.


================
Comment at: source/Host/common/MainLoop.cpp:167
+
+#ifdef FORCE_PSELECT
+  fd_set read_fd_set;
----------------
How about just moving this `#ifdef` up outside of the Poll function?  Given 
that it occurs so many times, i think it makes the logic and the differences 
between the two implementations easier to follow.


https://reviews.llvm.org/D32600



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to