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