diff options
author | Adrian McCarthy <amccarth@google.com> | 2017-06-22 18:43:18 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2017-06-22 18:43:18 +0000 |
commit | 31bcb6f680a07ddfc90f01dbfeb38b9994a67c3c (patch) | |
tree | da3e0cb31b60411e037123d09f8f4f20b6be3a2e /llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp | |
parent | 6a4b080a5f10f873e163eb526e499a75accea3a2 (diff) | |
download | bcm5719-llvm-31bcb6f680a07ddfc90f01dbfeb38b9994a67c3c.tar.gz bcm5719-llvm-31bcb6f680a07ddfc90f01dbfeb38b9994a67c3c.zip |
Add IDs and clone methods to NativeRawSymbol
All NativeRawSymbols will have a unique symbol ID (retrievable via
getSymIndexId). For now, these are initialized to 0, but soon the
NativeSession will be responsible for creating the raw symbols, and it will
assign unique IDs.
The symbol cache in the NativeSession will also require the ability to clone
raw symbols, so I've provided implementations for that as well.
llvm-svn: 306042
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp index bb52560be16..36731f586d2 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp @@ -17,8 +17,12 @@ namespace llvm { namespace pdb { -NativeExeSymbol::NativeExeSymbol(NativeSession &Session) - : NativeRawSymbol(Session), File(Session.getPDBFile()) {} +NativeExeSymbol::NativeExeSymbol(NativeSession &Session, uint32_t SymbolId) + : NativeRawSymbol(Session, SymbolId), File(Session.getPDBFile()) {} + +std::unique_ptr<NativeRawSymbol> NativeExeSymbol::clone() const { + return std::make_unique<NativeExeSymbol>(Session, SymbolId); +} std::unique_ptr<IPDBEnumSymbols> NativeExeSymbol::findChildren(PDB_SymType Type) const { |