From 6b3f41ed88e8e440e11a4fbf20b6600529f80049 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 16 May 2017 19:46:52 +0000 Subject: Vendor import of llvm trunk r303197: https://llvm.org/svn/llvm-project/llvm/trunk@303197 --- lib/Object/COFFObjectFile.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/Object/COFFObjectFile.cpp') diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index b1223e81be43..28531feccfe1 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -1062,7 +1062,7 @@ COFFObjectFile::getSectionContents(const coff_section *Sec, // In COFF, a virtual section won't have any in-file // content, so the file pointer to the content will be zero. if (Sec->PointerToRawData == 0) - return object_error::parse_failed; + return std::error_code(); // The only thing that we need to verify is that the contents is contained // within the file bounds. We don't need to make sure it doesn't cover other // data, as there's nothing that says that is not allowed. @@ -1602,8 +1602,6 @@ ErrorOr> ResourceSectionRef::getDirStringAtOffset(uint32_t Offse uint16_t Length; RETURN_IF_ERROR(Reader.readInteger(Length)); ArrayRef RawDirString; - // Strings are stored as 2-byte aligned unicode characters but readFixedString - // assumes byte string, so we double length. RETURN_IF_ERROR(Reader.readArray(RawDirString, Length)); return RawDirString; } -- cgit v1.2.3