Skip to content
Commit 10b0f3b3 authored by Benjamin Kramer's avatar Benjamin Kramer
Browse files

Various improvements to MemoryBuffer::getFile:

- Use a RAII object to close the FD.
- Use sys::StrError instead of thread-unsafe strerror calls.
- Recover gracefully if read returns zero. This works around an issue on
  DragonFlyBSD where /dev/null has an st_size of 136 but we can't read 136 bytes
  from it.

llvm-svn: 100106
parent 8841e86d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment