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/NativeCompilandSymbol.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/NativeCompilandSymbol.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp index 77f832582f8..bd5cdd4691e 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp @@ -13,13 +13,18 @@ namespace llvm { namespace pdb { NativeCompilandSymbol::NativeCompilandSymbol(NativeSession &Session, + uint32_t SymbolId, DbiModuleDescriptor MI) - : NativeRawSymbol(Session), Module(MI) {} + : NativeRawSymbol(Session, SymbolId), Module(MI) {} PDB_SymType NativeCompilandSymbol::getSymTag() const { return PDB_SymType::Compiland; } +std::unique_ptr<NativeRawSymbol> NativeCompilandSymbol::clone() const { + return std::make_unique<NativeCompilandSymbol>(Session, SymbolId, Module); +} + bool NativeCompilandSymbol::isEditAndContinueEnabled() const { return Module.hasECInfo(); } |