forked from OSchip/llvm-project
1b30ea2c50
Summary: There was a subtle, but pretty important difference between the Slice and regular versions of this function. The Slice function was zero-initializing the rest of the buffer when the read syscall returned less bytes than expected, while the regular function did not. This patch removes the inconsistency by making both functions *not* zero-initialize the buffer. The zeroing code is moved to the MemoryBuffer class, which is currently the only user of this code. This makes the API more consistent, and the code shorter. While in there, I also refactor the functions to return the number of bytes through the regular return value (via Expected<size_t>) instead of a separate by-ref argument. Reviewers: aganea, rnk Subscribers: kristina, Bigcheese, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66471 llvm-svn: 369627 |
||
---|---|---|
.. | ||
COM.inc | ||
DynamicLibrary.inc | ||
Host.inc | ||
Memory.inc | ||
Path.inc | ||
Process.inc | ||
Program.inc | ||
Signals.inc | ||
ThreadLocal.inc | ||
Threading.inc | ||
Watchdog.inc | ||
WindowsSupport.h | ||
explicit_symbols.inc |