-Add DeclChain member to DeclContext.
-ScopedDecls get chained to their DeclContext.
-DeclContext's DeclChain replaces FunctionDecl's DeclChain and EnumDecl's ElementList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52164 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 47334f5..949d100 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -116,7 +116,7 @@
 }
 
 void EnumDecl::Destroy(ASTContext& C) {
-  if (ElementList) ElementList->Destroy(C);
+  if (getEnumConstantList()) getEnumConstantList()->Destroy(C);
   Decl::Destroy(C);
 }