[cfe-commits] r44035 - in /cfe/trunk: AST/ASTContext.cpp AST/StmtSerialization.cpp AST/TypeSerialization.cpp Basic/IdentifierTable.cpp include/clang/AST/ASTContext.h include/clang/AST/Decl.h include/clang/AST/Expr.h include/clang/AST/Stmt.h include/clang/AST/Type.h include/clang/Basic/IdentifierTable.h
Ted Kremenek
kremenek at apple.com
Mon Nov 12 16:25:38 PST 2007
Author: kremenek
Date: Mon Nov 12 18:25:37 2007
New Revision: 44035
URL: http://llvm.org/viewvc/llvm-project?rev=44035&view=rev
Log:
Renamed all serialization "Materialize" methods to "Create" to conform with
the new serialization API.
Modified:
cfe/trunk/AST/ASTContext.cpp
cfe/trunk/AST/StmtSerialization.cpp
cfe/trunk/AST/TypeSerialization.cpp
cfe/trunk/Basic/IdentifierTable.cpp
cfe/trunk/include/clang/AST/ASTContext.h
cfe/trunk/include/clang/AST/Decl.h
cfe/trunk/include/clang/AST/Expr.h
cfe/trunk/include/clang/AST/Stmt.h
cfe/trunk/include/clang/AST/Type.h
cfe/trunk/include/clang/Basic/IdentifierTable.h
Modified: cfe/trunk/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/ASTContext.cpp?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/AST/ASTContext.cpp (original)
+++ cfe/trunk/AST/ASTContext.cpp Mon Nov 12 18:25:37 2007
@@ -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>();
Modified: cfe/trunk/AST/StmtSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/StmtSerialization.cpp?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/AST/StmtSerialization.cpp (original)
+++ cfe/trunk/AST/StmtSerialization.cpp Mon Nov 12 18:25:37 2007
@@ -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) {
Modified: cfe/trunk/AST/TypeSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/TypeSerialization.cpp?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/AST/TypeSerialization.cpp (original)
+++ cfe/trunk/AST/TypeSerialization.cpp Mon Nov 12 18:25:37 2007
@@ -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);
Modified: cfe/trunk/Basic/IdentifierTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Basic/IdentifierTable.cpp?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/Basic/IdentifierTable.cpp (original)
+++ cfe/trunk/Basic/IdentifierTable.cpp Mon Nov 12 18:25:37 2007
@@ -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;
Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Mon Nov 12 18:25:37 2007
@@ -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
Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Mon Nov 12 18:25:37 2007
@@ -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
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Mon Nov 12 18:25:37 2007
@@ -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));
}
};
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Mon Nov 12 18:25:37 2007
@@ -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.
Modified: cfe/trunk/include/clang/AST/Type.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/trunk/include/clang/AST/Type.h Mon Nov 12 18:25:37 2007
@@ -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).
Modified: cfe/trunk/include/clang/Basic/IdentifierTable.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/IdentifierTable.h?rev=44035&r1=44034&r2=44035&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/IdentifierTable.h (original)
+++ cfe/trunk/include/clang/Basic/IdentifierTable.h Mon Nov 12 18:25:37 2007
@@ -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
More information about the cfe-commits
mailing list