aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2025-02-27 11:15:59 +0100
committerGitHub <noreply@github.com>2025-02-27 11:15:59 +0100
commitc0b5451129bba52e33cd7957d58af897a58d14c6 (patch)
tree65471124ea25a26bd5267ce79ceb0ef35d189fa9 /llvm/lib/CodeGen/MachineScheduler.cpp
parent0e3ba99ad65f7025d37c857f9b587b767f7709e7 (diff)
downloadllvm-c0b5451129bba52e33cd7957d58af897a58d14c6.zip
llvm-c0b5451129bba52e33cd7957d58af897a58d14c6.tar.gz
llvm-c0b5451129bba52e33cd7957d58af897a58d14c6.tar.bz2
[lldb] Assorted improvements to the Pipe class (#128719)
The main motivation for this was the inconsistency in handling of partial reads/writes between the windows and posix implementations (windows was returning partial reads, posix was trying to fill the buffer completely). I settle on the windows implementation, as that's the more common behavior, and the "eager" version can be implemented on top of that (in most cases, it isn't necessary, since we're writing just a single byte). Since this also required auditing the callers to make sure they're handling partial reads/writes correctly, I used the opportunity to modernize the function signatures as a forcing function. They now use the `Timeout` class (basically an `optional<duration>`) to support both polls (timeout=0) and blocking (timeout=nullopt) operations in a single function, and use an `Expected` instead of a by-ref result to return the number of bytes read/written. As a drive-by, I also fix a problem with the windows implementation where we were rounding the timeout value down, which meant that calls could time out slightly sooner than expected.
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
0 files changed, 0 insertions, 0 deletions