rename ObjCList::clear() -> ObjCList::Destroy(). Require that destroy is called
before the dtor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65156 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index 9e030d7..ec67f5c 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -193,7 +193,7 @@
for (param_iterator I=param_begin(), E=param_end(); I!=E; ++I)
if (*I) (*I)->Destroy(C);
- ParamInfo.clear();
+ ParamInfo.Destroy();
Decl::Destroy(C);
}
@@ -280,7 +280,7 @@
for (ivar_iterator I=ivar_begin(), E=ivar_end(); I!=E; ++I)
if (*I) (*I)->Destroy(C);
- IVars.clear();
+ IVars.Destroy();
// FIXME: CategoryList?
// FIXME: Because there is no clear ownership
@@ -357,7 +357,7 @@
}
void ObjCProtocolDecl::Destroy(ASTContext &C) {
- ReferencedProtocols.clear();
+ ReferencedProtocols.Destroy();
ObjCContainerDecl::Destroy(C);
}
@@ -410,7 +410,7 @@
// obviating this problem. Because of this situation, referenced
// ObjCInterfaceDecls are destroyed in ~TranslationUnit.
- ForwardDecls.clear();
+ ForwardDecls.Destroy();
Decl::Destroy(C);
}
@@ -434,7 +434,7 @@
}
void ObjCForwardProtocolDecl::Destroy(ASTContext &C) {
- ReferencedProtocols.clear();
+ ReferencedProtocols.Destroy();
Decl::Destroy(C);
}
@@ -524,7 +524,7 @@
/// Destroy - Call destructors and release memory.
void ObjCImplementationDecl::Destroy(ASTContext& C) {
- IVars.clear();
+ IVars.Destroy();
Decl::Destroy(C);
}