summaryrefslogtreecommitdiff
path: root/tools/llvm-pdbdump/YAMLOutputStyle.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-08 17:12:57 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-08 17:12:57 +0000
commitc46e6a5940c50058e00c0c5f9123fd82e338d29a (patch)
tree89a719d723035c54a190b1f81d329834f1f93336 /tools/llvm-pdbdump/YAMLOutputStyle.cpp
parent148779df305667b6942fee7e758fdf81a6498f38 (diff)
Notes
Diffstat (limited to 'tools/llvm-pdbdump/YAMLOutputStyle.cpp')
-rw-r--r--tools/llvm-pdbdump/YAMLOutputStyle.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/tools/llvm-pdbdump/YAMLOutputStyle.cpp b/tools/llvm-pdbdump/YAMLOutputStyle.cpp
index b94b5a4abf37c..0573b23cdc761 100644
--- a/tools/llvm-pdbdump/YAMLOutputStyle.cpp
+++ b/tools/llvm-pdbdump/YAMLOutputStyle.cpp
@@ -305,23 +305,28 @@ Error YAMLOutputStyle::dumpDbiStream() {
Obj.DbiStream->PdbDllVersion = DS.getPdbDllVersion();
Obj.DbiStream->VerHeader = DS.getDbiVersion();
if (opts::pdb2yaml::DbiModuleInfo) {
- for (const auto &MI : DS.modules()) {
+ const auto &Modules = DS.modules();
+ for (uint32_t I = 0; I < Modules.getModuleCount(); ++I) {
+ DbiModuleDescriptor MI = Modules.getModuleDescriptor(I);
+
Obj.DbiStream->ModInfos.emplace_back();
yaml::PdbDbiModuleInfo &DMI = Obj.DbiStream->ModInfos.back();
- DMI.Mod = MI.Info.getModuleName();
- DMI.Obj = MI.Info.getObjFileName();
- if (opts::pdb2yaml::DbiModuleSourceFileInfo)
- DMI.SourceFiles = MI.SourceFiles;
+ DMI.Mod = MI.getModuleName();
+ DMI.Obj = MI.getObjFileName();
+ if (opts::pdb2yaml::DbiModuleSourceFileInfo) {
+ auto Files = Modules.source_files(I);
+ DMI.SourceFiles.assign(Files.begin(), Files.end());
+ }
- uint16_t ModiStream = MI.Info.getModuleStreamIndex();
+ uint16_t ModiStream = MI.getModuleStreamIndex();
if (ModiStream == kInvalidStreamIndex)
continue;
auto ModStreamData = msf::MappedBlockStream::createIndexedStream(
File.getMsfLayout(), File.getMsfBuffer(), ModiStream);
- pdb::ModuleDebugStreamRef ModS(MI.Info, std::move(ModStreamData));
+ pdb::ModuleDebugStreamRef ModS(MI, std::move(ModStreamData));
if (auto EC = ModS.reload())
return EC;