diff options
author | Zachary Turner <zturner@google.com> | 2018-09-05 23:30:38 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-09-05 23:30:38 +0000 |
commit | 7999b4fa48b31f67efa3662443a5c78343eb6f19 (patch) | |
tree | d29f403f65f7959cb4fbc5b70c603a6f16f91c40 /llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp | |
parent | e9f1df84af2f50a2cde01f7f2333f12ae326f3c1 (diff) | |
download | bcm5719-llvm-7999b4fa48b31f67efa3662443a5c78343eb6f19.tar.gz bcm5719-llvm-7999b4fa48b31f67efa3662443a5c78343eb6f19.zip |
[PDB] Refactor the PDB symbol classes to fix a reuse bug.
The way DIA SDK works is that when you request a symbol, it
gets assigned an internal identifier that is unique for the
life of the session. You can then use this identifier to
get back the same symbol, with all of the same internal state
that it had before, even if you "destroyed" the original
copy of the object you had.
This didn't work properly in our native implementation, and
if you destroyed an object for a particular symbol, then
requested the same symbol again, it would get assigned a new
ID and you'd get a fresh copy of the object. In order to fix
this some refactoring had to happen to properly reuse cached
objects. Some unittests are added to verify that symbol
reuse is taking place, making use of the new unittest input
feature.
llvm-svn: 341503
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp b/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp index 7132a99a9f1..da22a0ed89d 100644 --- a/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/Native/NativeCompilandSymbol.cpp @@ -17,7 +17,7 @@ namespace pdb { NativeCompilandSymbol::NativeCompilandSymbol(NativeSession &Session, SymIndexId SymbolId, DbiModuleDescriptor MI) - : NativeRawSymbol(Session, SymbolId), Module(MI) {} + : NativeRawSymbol(Session, PDB_SymType::Compiland, SymbolId), Module(MI) {} PDB_SymType NativeCompilandSymbol::getSymTag() const { return PDB_SymType::Compiland; |