diff --git a/clang/AST/ASTContext.cpp b/clang/AST/ASTContext.cpp index 66993681baf5c4dc1c52903094c6a4e831f0b7da..1438992bd0593680380935df13bf1a1fca6d33fd 100644 --- a/clang/AST/ASTContext.cpp +++ b/clang/AST/ASTContext.cpp @@ -1358,7 +1358,7 @@ void ReadVector(std::vector& V, std::vector& Types, V.reserve(size); for (unsigned i = 0 ; i < size ; ++i) { - T* t = D.Materialize(); + T* t = D.Create(); V.push_back(t); Types.push_back(t); } @@ -1511,7 +1511,7 @@ void ASTContext::Emit(llvm::Serializer& S) const { // FIXME: S.EmitOwnedPtr(CFConstantStringTypeDecl); } -ASTContext* ASTContext::Materialize(llvm::Deserializer& D) { +ASTContext* ASTContext::Create(llvm::Deserializer& D) { SourceManager &SM = D.ReadRef(); TargetInfo &t = D.ReadRef(); IdentifierTable &idents = D.ReadRef(); diff --git a/clang/AST/StmtSerialization.cpp b/clang/AST/StmtSerialization.cpp index 36743b7de27131fd897864fb51a4f3329f4224a2..fb251edb434873ac6cdaf10f19cf97a29e116742 100644 --- a/clang/AST/StmtSerialization.cpp +++ b/clang/AST/StmtSerialization.cpp @@ -27,7 +27,7 @@ void Stmt::Emit(Serializer& S) const { S.FlushRecord(); } -Stmt* Stmt::Materialize(Deserializer& D) { +Stmt* Stmt::Create(Deserializer& D) { StmtClass SC = static_cast(D.ReadInt()); switch (SC) { diff --git a/clang/AST/TypeSerialization.cpp b/clang/AST/TypeSerialization.cpp index 878b80688d80ec66d4938e4b100fff34dde9e360..5bb31e7362fa1ed634457d37ab2411d8eca1d5d9 100644 --- a/clang/AST/TypeSerialization.cpp +++ b/clang/AST/TypeSerialization.cpp @@ -65,7 +65,7 @@ void BuiltinType::Emit(llvm::Serializer& S) const { S.EmitInt(TypeKind); } -BuiltinType* BuiltinType::Materialize(llvm::Deserializer& D) { +BuiltinType* BuiltinType::Create(llvm::Deserializer& D) { Kind k = static_cast(D.ReadInt()); BuiltinType* T = new BuiltinType(k); return T; @@ -78,7 +78,7 @@ void ComplexType::Emit(llvm::Serializer& S) const { 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 @@ void PointerType::Emit(llvm::Serializer& S) const { 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 @@ void ReferenceType::Emit(llvm::Serializer& S) const { 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 @@ void ConstantArrayType::Emit(llvm::Serializer& S) const { 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 @@ void VariableArrayType::Emit(llvm::Serializer& S) const { 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 @@ void VectorType::Emit(llvm::Serializer& S) const { 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 @@ void FunctionType::ReadFunctionTypeInternal(llvm::Deserializer& D) { } -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 @@ void FunctionTypeProto::Emit(llvm::Serializer& S) const { 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 @@ void TypedefType::Emit(llvm::Serializer& S) const { 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/clang/Basic/IdentifierTable.cpp b/clang/Basic/IdentifierTable.cpp index f7f008220ff3a4a1a74ed8b8d04781c686796de8..c1830fa0ab52dda8db6d05d451563ba07508debf 100644 --- a/clang/Basic/IdentifierTable.cpp +++ b/clang/Basic/IdentifierTable.cpp @@ -432,7 +432,7 @@ void IdentifierTable::Emit(llvm::Serializer& S) const { S.ExitBlock(); } -IdentifierTable* IdentifierTable::Materialize(llvm::Deserializer& D) { +IdentifierTable* IdentifierTable::Create(llvm::Deserializer& D) { llvm::Deserializer::Location BLoc = D.getCurrentBlockLocation(); std::vector buff; diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index 773fe23c55ae3a46cf274183e96a8a254cadde61..ae3ff0c2216ae60e67d94d287b4b978c700b4800 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -310,7 +310,7 @@ private: 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/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index c3017f95214da35a82b1c5977aa16a98b487f58e..ba302b90e132fd835e35476b6cab4708d0d1037e 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -166,9 +166,6 @@ public: /// 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/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h index b3279a0429e4a78adfa0e76884d352f211ff8862..7f47a299b3d94a113e2ec30c020dba999b71709e 100644 --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -111,8 +111,8 @@ public: } static bool classof(const Expr *) { return true; } - static inline Expr* Materialize(llvm::Deserializer& D) { - return cast(Stmt::Materialize(D)); + static inline Expr* Create(llvm::Deserializer& D) { + return cast(Stmt::Create(D)); } }; diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h index fe8e6db9c1ef84485c3b5677ce8132bd3e1598a6..9e557a323e381b8008becf568f4caa4d82b26c45 100644 --- a/clang/include/clang/AST/Stmt.h +++ b/clang/include/clang/AST/Stmt.h @@ -115,7 +115,7 @@ public: } 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/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 6df13be7b011e09f7c702eb487ef341a79633a97..a264c24c89d236e89e3232cb20378996a1f6c0d4 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -399,7 +399,7 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: } 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 @@ public: 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 @@ public: 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 @@ public: 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 @@ public: 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/clang/include/clang/Basic/IdentifierTable.h b/clang/include/clang/Basic/IdentifierTable.h index ca3f147062b0ca084c081a531467c0ce795af914..79d8573221c53ec1013a6a54c6f0cc594e3a3b32 100644 --- a/clang/include/clang/Basic/IdentifierTable.h +++ b/clang/include/clang/Basic/IdentifierTable.h @@ -194,8 +194,8 @@ public: /// 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