[llvm] r261614 - Assert when trying to seek un-seekable raw_fd_ostream.
Yaron Keren via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 22 23:17:58 PST 2016
Author: yrnkrn
Date: Tue Feb 23 01:17:58 2016
New Revision: 261614
URL: http://llvm.org/viewvc/llvm-project?rev=261614&view=rev
Log:
Assert when trying to seek un-seekable raw_fd_ostream.
Modified:
llvm/trunk/lib/Support/raw_ostream.cpp
Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=261614&r1=261613&r2=261614&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Tue Feb 23 01:17:58 2016
@@ -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)
More information about the llvm-commits
mailing list