This patch contains these changes:

-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl

Patch by Argiris Kirtzidis!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49261 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp
index e6b3f93..a2e9ce1 100644
--- a/lib/AST/DeclSerialization.cpp
+++ b/lib/AST/DeclSerialization.cpp
@@ -106,7 +106,7 @@
 void ScopedDecl::EmitInRec(Serializer& S) const {
   NamedDecl::EmitInRec(S);
   S.EmitPtr(getNext());                     // From ScopedDecl.  
-  S.EmitPtr(cast_or_null<Decl>(getContextDecl()));  // From ScopedDecl.
+  S.EmitPtr(cast_or_null<Decl>(getDeclContext()));  // From ScopedDecl.
 }
 
 void ScopedDecl::ReadInRec(Deserializer& D) {
@@ -114,7 +114,7 @@
   D.ReadPtr(Next);                                  // From ScopedDecl.
   Decl *TmpD;
   D.ReadPtr(TmpD);                                  // From ScopedDecl.
-  CtxDecl = cast_or_null<ContextDecl>(TmpD);
+  CtxDecl = cast_or_null<DeclContext>(TmpD);
 }
     
   //===------------------------------------------------------------===//
@@ -306,7 +306,7 @@
 }
 
 FieldDecl* FieldDecl::CreateImpl(Deserializer& D) {
-  FieldDecl* decl = new FieldDecl(0, SourceLocation(), NULL, QualType(), 0);
+  FieldDecl* decl = new FieldDecl(SourceLocation(), NULL, QualType(), 0);
   decl->DeclType.ReadBackpatch(D);  
   decl->ReadInRec(D);
   decl->BitWidth = D.ReadOwnedPtr<Expr>();