[PATCH] D56475: Don't require a null terminator when loading objects
David Major via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 9 15:40:16 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350774: Don't require a null terminator when loading objects (authored by dmajor, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D56475?vs=180789&id=180950#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56475/new/
https://reviews.llvm.org/D56475
Files:
llvm/trunk/lib/Object/Binary.cpp
Index: llvm/trunk/lib/Object/Binary.cpp
===================================================================
--- llvm/trunk/lib/Object/Binary.cpp
+++ llvm/trunk/lib/Object/Binary.cpp
@@ -88,7 +88,8 @@
Expected<OwningBinary<Binary>> object::createBinary(StringRef Path) {
ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
- MemoryBuffer::getFileOrSTDIN(Path);
+ MemoryBuffer::getFileOrSTDIN(Path, /*FileSize=*/-1,
+ /*RequiresNullTerminator=*/false);
if (std::error_code EC = FileOrErr.getError())
return errorCodeToError(EC);
std::unique_ptr<MemoryBuffer> &Buffer = FileOrErr.get();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56475.180950.patch
Type: text/x-patch
Size: 644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190109/fb49b60b/attachment.bin>
More information about the llvm-commits
mailing list