@@ -980,9 +980,6 @@ class swift::MemberLookupTable {
980
980
// / Create a new member lookup table.
981
981
explicit MemberLookupTable (ASTContext &ctx);
982
982
983
- // / Destroy the lookup table.
984
- void destroy ();
985
-
986
983
// / Update a lookup table with members from newly-added extensions.
987
984
void updateLookupTable (NominalTypeDecl *nominal);
988
985
@@ -1039,10 +1036,6 @@ class ClassDecl::ObjCMethodLookupTable
1039
1036
StoredObjCMethods>
1040
1037
{
1041
1038
public:
1042
- void destroy () {
1043
- this ->~ObjCMethodLookupTable ();
1044
- }
1045
-
1046
1039
// Only allow allocation of member lookup tables using the allocator in
1047
1040
// ASTContext or by doing a placement new.
1048
1041
void *operator new (size_t Bytes, ASTContext &C,
@@ -1059,7 +1052,7 @@ MemberLookupTable::MemberLookupTable(ASTContext &ctx) {
1059
1052
// Register a cleanup with the ASTContext to call the lookup table
1060
1053
// destructor.
1061
1054
ctx.addCleanup ([this ]() {
1062
- this ->destroy ();
1055
+ this ->~MemberLookupTable ();
1063
1056
});
1064
1057
}
1065
1058
@@ -1127,10 +1120,6 @@ void MemberLookupTable::updateLookupTable(NominalTypeDecl *nominal) {
1127
1120
}
1128
1121
}
1129
1122
1130
- void MemberLookupTable::destroy () {
1131
- this ->~MemberLookupTable ();
1132
- }
1133
-
1134
1123
void NominalTypeDecl::addedMember (Decl *member) {
1135
1124
// If we have a lookup table, add the new member to it.
1136
1125
if (LookupTable.getPointer ()) {
@@ -1218,7 +1207,7 @@ void ClassDecl::createObjCMethodLookup() {
1218
1207
// Register a cleanup with the ASTContext to call the lookup table
1219
1208
// destructor.
1220
1209
ctx.addCleanup ([this ]() {
1221
- this ->ObjCMethodLookup ->destroy ();
1210
+ this ->ObjCMethodLookup ->~ObjCMethodLookupTable ();
1222
1211
});
1223
1212
}
1224
1213
0 commit comments