[Support/MemoryBuffer] Remove the assertion that the file size did not shrink.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 6 May 2014 23:30:56 +0000 (23:30 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 6 May 2014 23:30:56 +0000 (23:30 +0000)
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

lib/Support/MemoryBuffer.cpp

index 82cb7c0da7c12ac87768c452ea3e885afd49cc36..90945ab63aca20d71b00c2908f2468e454a38c29 100644 (file)
@@ -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;
     }