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 | e5636de5ec901f097b0d2961cd40b31c588ab154 (patch) | |
tree | 5386980e9b050819b400e748dc4e5b522e2efcd8 /lib/Support/raw_ostream.cpp | |
parent | 5261d1373daa093c490851ab6403c1424e1c1619 (diff) |
Assert when trying to seek un-seekable raw_fd_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/raw_ostream.cpp')
-rw-r--r-- | lib/Support/raw_ostream.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index 07497fcd731..a201dff600b 100644 --- a/lib/Support/raw_ostream.cpp +++ b/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) |