Renamed all serialization "Materialize" methods to "Create" to conform with
the new serialization API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44035 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp
index 6699368..1438992 100644
--- a/AST/ASTContext.cpp
+++ b/AST/ASTContext.cpp
@@ -1358,7 +1358,7 @@
   V.reserve(size);
   
   for (unsigned i = 0 ; i < size ; ++i) {
-    T* t = D.Materialize<T>();
+    T* t = D.Create<T>();
     V.push_back(t);
     Types.push_back(t);
   }
@@ -1511,7 +1511,7 @@
   // FIXME: S.EmitOwnedPtr(CFConstantStringTypeDecl);
 }
 
-ASTContext* ASTContext::Materialize(llvm::Deserializer& D) {
+ASTContext* ASTContext::Create(llvm::Deserializer& D) {
   SourceManager &SM = D.ReadRef<SourceManager>();
   TargetInfo &t = D.ReadRef<TargetInfo>();
   IdentifierTable &idents = D.ReadRef<IdentifierTable>();
diff --git a/AST/StmtSerialization.cpp b/AST/StmtSerialization.cpp
index 36743b7..fb251ed 100644
--- a/AST/StmtSerialization.cpp
+++ b/AST/StmtSerialization.cpp
@@ -27,7 +27,7 @@
   S.FlushRecord();
 }  
 
-Stmt* Stmt::Materialize(Deserializer& D) {
+Stmt* Stmt::Create(Deserializer& D) {
   StmtClass SC = static_cast<StmtClass>(D.ReadInt());
   
   switch (SC) {
diff --git a/AST/TypeSerialization.cpp b/AST/TypeSerialization.cpp
index 878b806..5bb31e7 100644
--- a/AST/TypeSerialization.cpp
+++ b/AST/TypeSerialization.cpp
@@ -65,7 +65,7 @@
   S.EmitInt(TypeKind);
 }
 
-BuiltinType* BuiltinType::Materialize(llvm::Deserializer& D) {
+BuiltinType* BuiltinType::Create(llvm::Deserializer& D) {
   Kind k = static_cast<Kind>(D.ReadInt());
   BuiltinType* T = new BuiltinType(k);
   return T;
@@ -78,7 +78,7 @@
   S.Emit(ElementType);
 }
 
-ComplexType* ComplexType::Materialize(llvm::Deserializer& D) {
+ComplexType* ComplexType::Create(llvm::Deserializer& D) {
   ComplexType* T = new ComplexType(QualType(),QualType());
   T->ReadTypeInternal(D);
   D.Read(T->ElementType);
@@ -90,7 +90,7 @@
   S.Emit(PointeeType);
 }
 
-PointerType* PointerType::Materialize(llvm::Deserializer& D) {
+PointerType* PointerType::Create(llvm::Deserializer& D) {
   PointerType* T = new PointerType(QualType(),QualType());
   T->ReadTypeInternal(D);
   D.Read(T->PointeeType);
@@ -102,7 +102,7 @@
   S.Emit(ReferenceeType);
 }
 
-ReferenceType* ReferenceType::Materialize(llvm::Deserializer& D) {
+ReferenceType* ReferenceType::Create(llvm::Deserializer& D) {
   ReferenceType* T = new ReferenceType(QualType(),QualType());
   T->ReadTypeInternal(D);
   D.Read(T->ReferenceeType);
@@ -128,7 +128,7 @@
   S.Emit(Size);
 }
 
-ConstantArrayType* ConstantArrayType::Materialize(llvm::Deserializer& D) {
+ConstantArrayType* ConstantArrayType::Create(llvm::Deserializer& D) {
   // "Default" construct the array type.
   ConstantArrayType* T =
     new ConstantArrayType(QualType(), QualType(), llvm::APInt(), 
@@ -146,7 +146,7 @@
   S.EmitOwnedPtr(SizeExpr);
 }
 
-VariableArrayType* VariableArrayType::Materialize(llvm::Deserializer& D) {
+VariableArrayType* VariableArrayType::Create(llvm::Deserializer& D) {
   // "Default" construct the array type.
   VariableArrayType* T =
     new VariableArrayType(QualType(), QualType(), NULL, ArrayType::Normal, 0);
@@ -164,7 +164,7 @@
   S.EmitInt(NumElements);
 }
 
-VectorType* VectorType::Materialize(llvm::Deserializer& D) {
+VectorType* VectorType::Create(llvm::Deserializer& D) {
   VectorType* T = new VectorType(QualType(),0,QualType());
   T->ReadTypeInternal(D);
   D.Read(T->ElementType);
@@ -185,7 +185,7 @@
 }
 
 
-FunctionTypeNoProto* FunctionTypeNoProto::Materialize(llvm::Deserializer& D) {
+FunctionTypeNoProto* FunctionTypeNoProto::Create(llvm::Deserializer& D) {
   FunctionTypeNoProto* T = new FunctionTypeNoProto(QualType(),QualType());
   T->ReadFunctionTypeInternal(D);
   return T;
@@ -199,7 +199,7 @@
     S.Emit(*i);    
 }
 
-FunctionTypeProto* FunctionTypeProto::Materialize(llvm::Deserializer& D) {
+FunctionTypeProto* FunctionTypeProto::Create(llvm::Deserializer& D) {
   unsigned NumArgs = D.ReadInt();
   
   FunctionTypeProto *FTP = 
@@ -227,7 +227,7 @@
   S.EmitPtr(Decl);
 }
 
-TypedefType* TypedefType::Materialize(llvm::Deserializer& D) {
+TypedefType* TypedefType::Create(llvm::Deserializer& D) {
   TypedefType* T = new TypedefType(NULL,QualType());
   T->ReadTypeInternal(D);
   D.ReadPtr(T->Decl);
diff --git a/Basic/IdentifierTable.cpp b/Basic/IdentifierTable.cpp
index f7f0082..c1830fa 100644
--- a/Basic/IdentifierTable.cpp
+++ b/Basic/IdentifierTable.cpp
@@ -432,7 +432,7 @@
   S.ExitBlock();
 }
 
-IdentifierTable* IdentifierTable::Materialize(llvm::Deserializer& D) {
+IdentifierTable* IdentifierTable::Create(llvm::Deserializer& D) {
   llvm::Deserializer::Location BLoc = D.getCurrentBlockLocation();
 
   std::vector<char> buff;
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 773fe23..ae3ff0c 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -310,7 +310,7 @@
 
 public:
   void Emit(llvm::Serializer& S) const;
-  static ASTContext* Materialize(llvm::Deserializer& D);  
+  static ASTContext* Create(llvm::Deserializer& D);  
 };
   
 }  // end namespace clang
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index c3017f9..ba302b9 100644
--- a/include/clang/AST/Decl.h
+++ b/include/clang/AST/Decl.h
@@ -166,9 +166,6 @@
     
   /// Create - Deserialize a Decl from Bitcode.
   static Decl* Create(llvm::Deserializer& D);
-  
-  /// Materialize - Deserialize a Decl from Bitcode. (DEPRECATED)
-  static Decl* Materialize(llvm::Deserializer& D) { return Create(D); }
 
 protected:
   /// EmitImpl - Provides the subclass-specific serialization logic for
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index b3279a0..7f47a29 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -111,8 +111,8 @@
   }
   static bool classof(const Expr *) { return true; }
   
-  static inline Expr* Materialize(llvm::Deserializer& D) {
-    return cast<Expr>(Stmt::Materialize(D));    
+  static inline Expr* Create(llvm::Deserializer& D) {
+    return cast<Expr>(Stmt::Create(D));    
   }
 };
 
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index fe8e6db..9e557a3 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -115,7 +115,7 @@
   }
   
   void Emit(llvm::Serializer& S) const;
-  static Stmt* Materialize(llvm::Deserializer& D);
+  static Stmt* Create(llvm::Deserializer& D);
   
   virtual void EmitImpl(llvm::Serializer& S) const {
     // This method will eventually be a pure-virtual function.
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index 6df13be..a264c24 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -399,7 +399,7 @@
   static bool classof(const BuiltinType *) { return true; }
   
   void Emit(llvm::Serializer& S) const;
-  static BuiltinType* Materialize(llvm::Deserializer& D);
+  static BuiltinType* Create(llvm::Deserializer& D);
 };
 
 /// ComplexType - C99 6.2.5p11 - Complex values.  This supports the C99 complex
@@ -428,7 +428,7 @@
   static bool classof(const ComplexType *) { return true; }
   
   void Emit(llvm::Serializer& S) const;
-  static ComplexType* Materialize(llvm::Deserializer& D);
+  static ComplexType* Create(llvm::Deserializer& D);
 };
 
 
@@ -458,7 +458,7 @@
   static bool classof(const PointerType *) { return true; }
   
   void Emit(llvm::Serializer& S) const;
-  static PointerType* Materialize(llvm::Deserializer& D);
+  static PointerType* Create(llvm::Deserializer& D);
 };
 
 /// ReferenceType - C++ 8.3.2 - Reference Declarators.
@@ -485,7 +485,7 @@
   static bool classof(const ReferenceType *) { return true; }
   
   void Emit(llvm::Serializer& S) const;
-  static ReferenceType* Materialize(llvm::Deserializer& D);
+  static ReferenceType* Create(llvm::Deserializer& D);
 };
 
 /// ArrayType - C99 6.7.5.2 - Array Declarators.
@@ -575,7 +575,7 @@
   static bool classof(const ConstantArrayType *) { return true; }
   
   void Emit(llvm::Serializer& S) const;
-  static ConstantArrayType* Materialize(llvm::Deserializer& D);
+  static ConstantArrayType* Create(llvm::Deserializer& D);
 };
 
 // FIXME: VariableArrayType's aren't uniqued (since expressions aren't).
@@ -612,7 +612,7 @@
   }
   
   void Emit(llvm::Serializer& S) const;
-  static VariableArrayType* Materialize(llvm::Deserializer& D);
+  static VariableArrayType* Create(llvm::Deserializer& D);
 };
 
 /// VectorType - GCC generic vector type. This type is created using
@@ -655,7 +655,7 @@
   static bool classof(const VectorType *) { return true; }
   
   void Emit(llvm::Serializer& S) const;
-  static VectorType* Materialize(llvm::Deserializer& D);
+  static VectorType* Create(llvm::Deserializer& D);
 };
 
 /// OCUVectorType - Extended vector type. This type is created using
@@ -769,7 +769,7 @@
   static bool classof(const FunctionTypeNoProto *) { return true; }
   
   void Emit(llvm::Serializer& S) const { EmitFunctionTypeInternal(S); }
-  static FunctionTypeNoProto* Materialize(llvm::Deserializer& D);
+  static FunctionTypeNoProto* Create(llvm::Deserializer& D);
 };
 
 /// FunctionTypeProto - Represents a prototype with argument type info, e.g.
@@ -820,7 +820,7 @@
                       bool isVariadic);
   
   void Emit(llvm::Serializer& S) const;
-  static FunctionTypeProto* Materialize(llvm::Deserializer& D);
+  static FunctionTypeProto* Create(llvm::Deserializer& D);
   
 protected:
   // Used by deserialization.
@@ -853,7 +853,7 @@
   static bool classof(const TypedefType *) { return true; }
   
   void Emit(llvm::Serializer& S) const;
-  static TypedefType* Materialize(llvm::Deserializer& D);
+  static TypedefType* Create(llvm::Deserializer& D);
 };
 
 /// TypeOfExpr (GCC extension).
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index ca3f147..79d8573 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -194,8 +194,8 @@
   ///  are actually referenced are serialized.
   void Emit(llvm::Serializer& S) const;
   
-  /// Materialize - Deserialize an IdentifierTable from a bitstream.
-  static IdentifierTable* Materialize(llvm::Deserializer& D);
+  /// Create - Deserialize an IdentifierTable from a bitstream.
+  static IdentifierTable* Create(llvm::Deserializer& D);
   
 private:  
   /// This ctor is not intended to be used by anyone except for object