Use forward declarations for ASTDeclContextNameLookupTable and add a missing delete.
It would be nice to use OwningPtr here, but DeclContextInfo is stored in a DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154763 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Serialization/Module.cpp b/lib/Serialization/Module.cpp
index 16b95e2..ff241d3 100644
--- a/lib/Serialization/Module.cpp
+++ b/lib/Serialization/Module.cpp
@@ -45,8 +45,7 @@
E = DeclContextInfos.end();
I != E; ++I) {
if (I->second.NameLookupTableData)
- delete static_cast<ASTDeclContextNameLookupTable*>(
- I->second.NameLookupTableData);
+ delete I->second.NameLookupTableData;
}
delete static_cast<ASTIdentifierLookupTable *>(IdentifierLookupTable);