mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208143 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9e9ec9b69c
commit
6d46f2d394
@ -426,9 +426,6 @@ static error_code getOpenFileImpl(int FD, const char *Filename,
|
|||||||
return error_code(errno, posix_category());
|
return error_code(errno, posix_category());
|
||||||
}
|
}
|
||||||
if (NumRead == 0) {
|
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.
|
memset(BufPtr, 0, BytesLeft); // zero-initialize rest of the buffer.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user