aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/MemoryBuffer.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-05-06 23:30:56 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-05-06 23:30:56 +0000
commitdff3ef80bbd499fb28651fc7990524fd2a612764 (patch)
tree2e8fe870bb9540dbc4a5da3f2ee7453a6d22bd68 /llvm/lib/Support/MemoryBuffer.cpp
parent37b7b2aefc7d9e84c7aca1767c143c75eb461196 (diff)
downloadllvm-dff3ef80bbd499fb28651fc7990524fd2a612764.zip
llvm-dff3ef80bbd499fb28651fc7990524fd2a612764.tar.gz
llvm-dff3ef80bbd499fb28651fc7990524fd2a612764.tar.bz2
[Support/MemoryBuffer] Remove the assertion that the file size did not shrink.
This can happen in practice with the user changing files and we can recover from it. llvm-svn: 208143
Diffstat (limited to 'llvm/lib/Support/MemoryBuffer.cpp')
-rw-r--r--llvm/lib/Support/MemoryBuffer.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp
index 82cb7c0..90945ab 100644
--- a/llvm/lib/Support/MemoryBuffer.cpp
+++ b/llvm/lib/Support/MemoryBuffer.cpp
@@ -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;
}