diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-04-01 14:35:22 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-04-01 14:35:22 +0000 |
commit | 6a9cd415495cd2422502fa2b84835409ce80d4de (patch) | |
tree | f3cfa84cd14bcf32ce113e82208acc29a28c0ad0 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 0bf77de91fa3663b3bc189624569e2ff9a714f43 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
0 files changed, 0 insertions, 0 deletions