diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-08 17:12:57 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-08 17:12:57 +0000 |
commit | c46e6a5940c50058e00c0c5f9123fd82e338d29a (patch) | |
tree | 89a719d723035c54a190b1f81d329834f1f93336 /tools/llvm-pdbdump/StreamUtil.cpp | |
parent | 148779df305667b6942fee7e758fdf81a6498f38 (diff) |
Notes
Diffstat (limited to 'tools/llvm-pdbdump/StreamUtil.cpp')
-rw-r--r-- | tools/llvm-pdbdump/StreamUtil.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/llvm-pdbdump/StreamUtil.cpp b/tools/llvm-pdbdump/StreamUtil.cpp index 6577702adac8..81aa256b5002 100644 --- a/tools/llvm-pdbdump/StreamUtil.cpp +++ b/tools/llvm-pdbdump/StreamUtil.cpp @@ -12,6 +12,7 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseMapInfo.h" #include "llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h" +#include "llvm/DebugInfo/PDB/Native/DbiModuleList.h" #include "llvm/DebugInfo/PDB/Native/DbiStream.h" #include "llvm/DebugInfo/PDB/Native/InfoStream.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h" @@ -30,14 +31,16 @@ void discoverStreamPurposes(PDBFile &File, auto Info = File.getPDBInfoStream(); uint32_t StreamCount = File.getNumStreams(); - DenseMap<uint16_t, const ModuleInfoEx *> ModStreams; + DenseMap<uint16_t, DbiModuleDescriptor> ModStreams; DenseMap<uint16_t, std::string> NamedStreams; if (Dbi) { - for (auto &ModI : Dbi->modules()) { - uint16_t SN = ModI.Info.getModuleStreamIndex(); + const DbiModuleList &Modules = Dbi->modules(); + for (uint32_t I = 0; I < Modules.getModuleCount(); ++I) { + DbiModuleDescriptor Descriptor = Modules.getModuleDescriptor(I); + uint16_t SN = Descriptor.getModuleStreamIndex(); if (SN != kInvalidStreamIndex) - ModStreams[SN] = &ModI; + ModStreams[SN] = Descriptor; } } if (Info) { @@ -109,7 +112,7 @@ void discoverStreamPurposes(PDBFile &File, auto NSIter = NamedStreams.find(StreamIdx); if (ModIter != ModStreams.end()) { Value = "Module \""; - Value += ModIter->second->Info.getModuleName().str(); + Value += ModIter->second.getModuleName(); Value += "\""; } else if (NSIter != NamedStreams.end()) { Value = "Named Stream \""; |