Let OnDiskHashTable call the destructor of its Items.
authorNico Weber <nicolasweber@gmx.de>
Wed, 7 May 2014 19:55:38 +0000 (19:55 +0000)
committerNico Weber <nicolasweber@gmx.de>
Wed, 7 May 2014 19:55:38 +0000 (19:55 +0000)
commit1ec10c111c2aecfb14a3cb50162b3e4403d4b066
treecfe060b1ce2fddb83b70e986645e7eeac8970c1e
parentb507e6601d23aa37f60b1714f76a8abb00c492d3
Let OnDiskHashTable call the destructor of its Items.

OnDiskHashTable::insert() calls the Item constructor via placement new, but
nothing called the destructor.  This matters in cases when the Info template
parameter has key_type or data_type typedefs that have a destructor, for
example like IdentifierIndexWriterTrait in clang's GlobalModuleIndex.cpp.

This fixes a 5-year old bug that's been around since the OnDiskHashTable code
was added in r64192.  Bug found by LSan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208243 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/OnDiskHashTable.h