1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Assert when trying to seek un-seekable raw_fd_ostream.

llvm-svn: 261614
This commit is contained in:
Yaron Keren 2016-02-23 07:17:58 +00:00
parent ba3eb3f3a0
commit 672ca3153a

View File

@ -623,6 +623,7 @@ void raw_fd_ostream::close() {
}
uint64_t raw_fd_ostream::seek(uint64_t off) {
assert(SupportsSeeking && "Stream does not support seeking!");
flush();
pos = ::lseek(FD, off, SEEK_SET);
if (pos == (uint64_t)-1)