Skip to content

Commit

Permalink
[Support/MemoryBuffer] Remove the assertion that the file size did no…
Browse files Browse the repository at this point in the history
…t shrink.

This can happen in practice with the user changing files and we can recover from it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208143 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
akyrtzi committed May 6, 2014
1 parent 9e9ec9b commit 6d46f2d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/Support/MemoryBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,6 @@ static error_code getOpenFileImpl(int FD, const char *Filename,
return error_code(errno, posix_category());
}
if (NumRead == 0) {
assert(IsVolatileSize &&
"We got inaccurate FileSize value or fstat reported an invalid "
"file size.");
memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer.
break;
}
Expand Down

0 comments on commit 6d46f2d

Please sign in to comment.