forked from OSchip/llvm-project
fix leakage of CXXSpecialName objects in DeclarationNameTable
llvm-svn: 61007
This commit is contained in:
parent
f312dc7729
commit
127adb4462
|
@ -259,7 +259,16 @@ DeclarationNameTable::DeclarationNameTable() {
|
|||
}
|
||||
|
||||
DeclarationNameTable::~DeclarationNameTable() {
|
||||
delete static_cast<llvm::FoldingSet<CXXSpecialName>*>(CXXSpecialNamesImpl);
|
||||
llvm::FoldingSet<CXXSpecialName> *set =
|
||||
static_cast<llvm::FoldingSet<CXXSpecialName>*>(CXXSpecialNamesImpl);
|
||||
llvm::FoldingSetIterator<CXXSpecialName> it = set->begin();
|
||||
|
||||
while (it != set->end()) {
|
||||
CXXSpecialName *n = &*it++;
|
||||
delete n;
|
||||
}
|
||||
|
||||
delete set;
|
||||
delete [] CXXOperatorNames;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue