From 349c18f8377aa46af024e0ba7d312304ad2ac28a Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Mon, 5 Jun 2017 21:40:33 +0000 Subject: [CodeView] Handle Cross Module Imports and Exports. While it's not entirely clear why a compiler or linker might put this information into an object or PDB file, one has been spotted in the wild which was causing llvm-pdbdump to crash. This patch adds support for reading-writing these sections. Since I don't know how to get one of the native tools to generate this kind of debug info, the only test here is one in which we feed YAML into the tool to produce a PDB and then spit out YAML from the resulting PDB and make sure that it matches. llvm-svn: 304738 --- llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp') diff --git a/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp b/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp index c4ff30011a1..4186f2eb6ba 100644 --- a/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp @@ -90,14 +90,14 @@ Error ModuleDebugStreamRef::commit() { return Error::success(); } Expected ModuleDebugStreamRef::findChecksumsSubsection() const { + codeview::DebugChecksumsSubsectionRef Result; for (const auto &SS : subsections()) { if (SS.kind() != DebugSubsectionKind::FileChecksums) continue; - codeview::DebugChecksumsSubsectionRef Result; if (auto EC = Result.initialize(SS.getRecordData())) return std::move(EC); return Result; } - return make_error(raw_error_code::no_entry); + return Result; } -- cgit v1.2.3