aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-11-13 00:25:37 +0000
committerTed Kremenek <kremenek@apple.com>2007-11-13 00:25:37 +0000
commit0f84c0059cec39fd1c73ac05bc2864dca664e7f4 (patch)
treebbebc9fb61f7c1ebcbdb847cb745a354b84ab6fc
parent928fd7f76808b895b68a9c6ed55a8f185fad6a35 (diff)
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
-rw-r--r--AST/ASTContext.cpp4
-rw-r--r--AST/StmtSerialization.cpp2
-rw-r--r--AST/TypeSerialization.cpp20
-rw-r--r--Basic/IdentifierTable.cpp2
-rw-r--r--include/clang/AST/ASTContext.h2
-rw-r--r--include/clang/AST/Decl.h3
-rw-r--r--include/clang/AST/Expr.h4
-rw-r--r--include/clang/AST/Stmt.h2
-rw-r--r--include/clang/AST/Type.h20
-rw-r--r--include/clang/Basic/IdentifierTable.h4
10 files changed, 30 insertions, 33 deletions
diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp
index 66993681ba..1438992bd0 100644
--- a/AST/ASTContext.cpp
+++ b/AST/ASTContext.cpp
@@ -1358,7 +1358,7 @@ void ReadVector(std::vector<T*>& V, std::vector<Type*>& Types,
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 @@ 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<SourceManager>();
TargetInfo &t = D.ReadRef<TargetInfo>();
IdentifierTable &idents = D.ReadRef<IdentifierTable>();
diff --git a/AST/StmtSerialization.cpp b/AST/StmtSerialization.cpp
index 36743b7de2..fb251edb43 100644
--- a/AST/StmtSerialization.cpp
+++ b/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<StmtClass>(D.ReadInt());
switch (SC) {
diff --git a/AST/TypeSerialization.cpp b/AST/TypeSerialization.cpp
index 878b80688d..5bb31e7362 100644
--- a/AST/TypeSerialization.cpp
+++ b/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<Kind>(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/Basic/IdentifierTable.cpp b/Basic/IdentifierTable.cpp
index f7f008220f..c1830fa0ab 100644
--- a/Basic/IdentifierTable.cpp
+++ b/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<char> buff;
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index 773fe23c55..ae3ff0c221 100644
--- a/include/clang/AST/ASTContext.h
+++ b/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/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index c3017f9521..ba302b90e1 100644
--- a/include/clang/AST/Decl.h
+++ b/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/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index b3279a0429..7f47a299b3 100644
--- a/include/clang/AST/Expr.h
+++ b/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<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 fe8e6db9c1..9e557a323e 100644
--- a/include/clang/AST/Stmt.h
+++ b/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/include/clang/AST/Type.h b/include/clang/AST/Type.h
index 6df13be7b0..a264c24c89 100644
--- a/include/clang/AST/Type.h
+++ b/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/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index ca3f147062..79d8573221 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/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