diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2016-02-23 07:17:58 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2016-02-23 07:17:58 +0000 |
commit | 7cf7f80c377f30ce0c9692c429964f92f6b99f0c (patch) | |
tree | 5f2578b97e7345851ac988fc2a8b15efb1fd3bfb /llvm/lib/Support/raw_ostream.cpp | |
parent | b7eb8db02369b7abf72ba6d06f9064c05f76cbb7 (diff) | |
download | bcm5719-llvm-7cf7f80c377f30ce0c9692c429964f92f6b99f0c.tar.gz bcm5719-llvm-7cf7f80c377f30ce0c9692c429964f92f6b99f0c.zip |
Assert when trying to seek un-seekable raw_fd_ostream.
llvm-svn: 261614
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r-- | llvm/lib/Support/raw_ostream.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 07497fcd731..a201dff600b 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -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) |