From 7999b4fa48b31f67efa3662443a5c78343eb6f19 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Wed, 5 Sep 2018 23:30:38 +0000 Subject: [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 --- llvm/lib/DebugInfo/PDB/PDBSymbolBlock.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'llvm/lib/DebugInfo/PDB/PDBSymbolBlock.cpp') diff --git a/llvm/lib/DebugInfo/PDB/PDBSymbolBlock.cpp b/llvm/lib/DebugInfo/PDB/PDBSymbolBlock.cpp index 7076b4aec34..13eec9734d0 100644 --- a/llvm/lib/DebugInfo/PDB/PDBSymbolBlock.cpp +++ b/llvm/lib/DebugInfo/PDB/PDBSymbolBlock.cpp @@ -17,10 +17,4 @@ using namespace llvm; using namespace llvm::pdb; -PDBSymbolBlock::PDBSymbolBlock(const IPDBSession &PDBSession, - std::unique_ptr Symbol) - : PDBSymbol(PDBSession, std::move(Symbol)) { - assert(RawSymbol->getSymTag() == PDB_SymType::Block); -} - void PDBSymbolBlock::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); } -- cgit v1.2.3