aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-04-20 13:04:30 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-04-20 13:04:30 +0000
commit4ba9af11417c45abc063c9906c7e593b85fccc17 (patch)
tree74c9c3c8863fad2220549977653461c7e5eddc9f /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent5de4a6c0af0df9f5ae5f9614d2a5fd0f17c597b8 (diff)
downloadllvm-4ba9af11417c45abc063c9906c7e593b85fccc17.zip
llvm-4ba9af11417c45abc063c9906c7e593b85fccc17.tar.gz
llvm-4ba9af11417c45abc063c9906c7e593b85fccc17.tar.bz2
Don't allow pwrite to resize a stream.
The current implementations could exhibit some behavior differences: raw_fd_ostream: Whatever the underlying fd does with seek+write. In a normal file, the write position would be back to the old offset. raw_svector_ostream: The write position is always the end of the stream, so after pwrite the write position would be the new end. This matches what OS_X (all BSD?) do with a pwrite in a O_APPEND fd. Given that we don't need that feature and don't use O_APPEND a lot in LLVM, just disallow it. I am open to suggestions on renaming pwrite to something else, but this fixes the issue for now. Thanks to Yaron Keren for reporting it. llvm-svn: 235303
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions