aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index a2b39c438d..7930c90953 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -217,6 +217,19 @@ unsigned FunctionDecl::getMinRequiredArguments() const {
// RecordDecl Implementation
//===----------------------------------------------------------------------===//
+RecordDecl::~RecordDecl() {
+ delete[] Members;
+}
+
+void RecordDecl::Destroy(ASTContext& C) {
+ if (isDefinition())
+ for (field_iterator I=field_begin(), E=field_end(); I!=E; ++I)
+ (*I)->Destroy(C);
+
+ TagDecl::Destroy(C);
+}
+
+
/// defineBody - When created, RecordDecl's correspond to a forward declared
/// record. This method is used to mark the decl as being defined, with the
/// specified contents.