diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp index 999f2438d94..e927b60a447 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp @@ -163,7 +163,6 @@ std::error_code PDBFile::parseStreamData() { uint32_t NumStreams = 0; uint32_t StreamIdx = 0; uint64_t DirectoryBytesRead = 0; - std::error_code EC; MemoryBufferRef M = *Context->Buffer; const SuperBlock *SB = Context->SB; @@ -185,7 +184,7 @@ std::error_code PDBFile::parseStreamData() { makeArrayRef(reinterpret_cast<const uint32_t *>(M.getBufferStart() + DirectoryBlockOffset), SB->BlockSize / sizeof(support::ulittle32_t)); - if (EC = checkOffset(M, DirectoryBlock)) + if (auto EC = checkOffset(M, DirectoryBlock)) return EC; // We read data out of the directory four bytes at a time. Depending on diff --git a/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp b/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp index 05eac639d20..32c04beda78 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/RawSession.cpp @@ -32,15 +32,15 @@ PDB_ErrorCode RawSession::createFromPdb(StringRef Path, /*RequiresNullTerminator=*/false); std::error_code EC; - if (EC = ErrorOrBuffer.getError()) + if ((EC = ErrorOrBuffer.getError())) return PDB_ErrorCode::CouldNotCreateImpl; std::unique_ptr<MemoryBuffer> &Buffer = ErrorOrBuffer.get(); std::unique_ptr<PDBFile> File(new PDBFile(std::move(Buffer))); - if (EC = File->parseFileHeaders()) + if ((EC = File->parseFileHeaders())) return PDB_ErrorCode::InvalidFileFormat; - if (EC = File->parseStreamData()) + if ((EC = File->parseStreamData())) return PDB_ErrorCode::InvalidFileFormat; Session.reset(new RawSession(std::move(File))); |