1 diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp
2 index d7c25921ec3..fe41987f5c2 100644
3 --- a/llvm/lib/Object/Binary.cpp
4 +++ b/llvm/lib/Object/Binary.cpp
5 @@ -88,7 +88,8 @@ Expected<std::unique_ptr<Binary>> object::createBinary(MemoryBufferRef Buffer,
7 Expected<OwningBinary<Binary>> object::createBinary(StringRef Path) {
8 ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
9 - MemoryBuffer::getFileOrSTDIN(Path);
10 + MemoryBuffer::getFileOrSTDIN(Path, /*FileSize=*/-1,
11 + /*RequiresNullTerminator=*/false);
12 if (std::error_code EC = FileOrErr.getError())
13 return errorCodeToError(EC);
14 std::unique_ptr<MemoryBuffer> &Buffer = FileOrErr.get();