diff options
| author | 2019-06-23 21:36:31 +0000 | |
|---|---|---|
| committer | 2019-06-23 21:36:31 +0000 | |
| commit | 23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch) | |
| tree | f7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp | |
| parent | sort previous; ok deraadt (diff) | |
| download | wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip | |
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp')
| -rw-r--r-- | gnu/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/gnu/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp b/gnu/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp index a65782e2d4f..6e4d56443a0 100644 --- a/gnu/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp +++ b/gnu/llvm/lib/DebugInfo/PDB/Native/NativeEnumModules.cpp @@ -10,42 +10,35 @@ #include "llvm/DebugInfo/PDB/Native/NativeEnumModules.h" #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" -#include "llvm/DebugInfo/PDB/Native/DbiModuleList.h" #include "llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h" +#include "llvm/DebugInfo/PDB/Native/NativeExeSymbol.h" #include "llvm/DebugInfo/PDB/Native/NativeSession.h" #include "llvm/DebugInfo/PDB/PDBSymbol.h" #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h" +#include "llvm/DebugInfo/PDB/PDBSymbolExe.h" namespace llvm { namespace pdb { -NativeEnumModules::NativeEnumModules(NativeSession &PDBSession, - const DbiModuleList &Modules, - uint32_t Index) - : Session(PDBSession), Modules(Modules), Index(Index) {} +NativeEnumModules::NativeEnumModules(NativeSession &PDBSession, uint32_t Index) + : Session(PDBSession), Index(Index) {} uint32_t NativeEnumModules::getChildCount() const { - return static_cast<uint32_t>(Modules.getModuleCount()); + return Session.getSymbolCache().getNumCompilands(); } std::unique_ptr<PDBSymbol> -NativeEnumModules::getChildAtIndex(uint32_t Index) const { - if (Index >= Modules.getModuleCount()) - return nullptr; - return Session.createCompilandSymbol(Modules.getModuleDescriptor(Index)); +NativeEnumModules::getChildAtIndex(uint32_t N) const { + return Session.getSymbolCache().getOrCreateCompiland(N); } std::unique_ptr<PDBSymbol> NativeEnumModules::getNext() { - if (Index >= Modules.getModuleCount()) + if (Index >= getChildCount()) return nullptr; return getChildAtIndex(Index++); } void NativeEnumModules::reset() { Index = 0; } -NativeEnumModules *NativeEnumModules::clone() const { - return new NativeEnumModules(Session, Modules, Index); -} - } } |
