aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-04-01 14:35:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-04-01 14:35:22 +0000
commit10b0f3b314f03a066e3890dbb1334078cc881e00 (patch)
treee4413d8c2f547aa8fc9f5957a7cedd06490686ab /llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
parent8841e86d1115ebdf054e905dd41193ab5111658e (diff)
downloadllvm-10b0f3b314f03a066e3890dbb1334078cc881e00.zip
llvm-10b0f3b314f03a066e3890dbb1334078cc881e00.tar.gz
llvm-10b0f3b314f03a066e3890dbb1334078cc881e00.tar.bz2
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp')
0 files changed, 0 insertions, 0 deletions