summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-06-05 21:40:33 +0000
committerZachary Turner <zturner@google.com>2017-06-05 21:40:33 +0000
commit349c18f8377aa46af024e0ba7d312304ad2ac28a (patch)
tree1bbd719c419cb69fa87cd037de57ab206216741e /llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp
parent5b0bf2ff0d80998804871ab151ec2f00ff2dee8b (diff)
downloadbcm5719-llvm-349c18f8377aa46af024e0ba7d312304ad2ac28a.tar.gz
bcm5719-llvm-349c18f8377aa46af024e0ba7d312304ad2ac28a.zip
[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
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp4
1 files changed, 2 insertions, 2 deletions
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<codeview::DebugChecksumsSubsectionRef>
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<RawError>(raw_error_code::no_entry);
+ return Result;
}
OpenPOWER on IntegriCloud