diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-05-27 16:16:56 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-05-27 16:16:56 +0000 |
commit | 836937ed795dd4b6ea0da4dbf1bdab2806dd248d (patch) | |
tree | 88eab8299a4a7e9ab0c504504b6f2aa3a958ef56 /llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp | |
parent | 9efba74778fcc91f12e5178f42fcb1d6208f5bce (diff) | |
download | llvm-836937ed795dd4b6ea0da4dbf1bdab2806dd248d.zip llvm-836937ed795dd4b6ea0da4dbf1bdab2806dd248d.tar.gz llvm-836937ed795dd4b6ea0da4dbf1bdab2806dd248d.tar.bz2 |
Make sure these error codes are marked as checked
llvm-svn: 271013
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp b/llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp index 7206907..2d5fd41 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp @@ -98,16 +98,18 @@ Error NameHashTable::load(codeview::StreamReader &Stream) { Signature = H->Signature; HashVersion = H->HashVersion; if (auto EC = Stream.readStreamRef(NamesBuffer, H->ByteSize)) - return make_error<RawError>(raw_error_code::corrupt_file, - "Invalid hash table byte length"); + return joinErrors(std::move(EC), + make_error<RawError>(raw_error_code::corrupt_file, + "Invalid hash table byte length")); const support::ulittle32_t *HashCount; if (auto EC = Stream.readObject(HashCount)) return EC; if (auto EC = Stream.readArray(IDs, *HashCount)) - return make_error<RawError>(raw_error_code::corrupt_file, - "Could not read bucket array"); + return joinErrors(std::move(EC), + make_error<RawError>(raw_error_code::corrupt_file, + "Could not read bucket array")); if (Stream.bytesRemaining() < sizeof(support::ulittle32_t)) return make_error<RawError>(raw_error_code::corrupt_file, |