[cfe-commits] r44020 - in /cfe/trunk: AST/StmtSerialization.cpp include/clang/AST/Expr.h include/clang/AST/Stmt.h
Ted Kremenek
kremenek at apple.com
Mon Nov 12 10:04:32 PST 2007
Author: kremenek
Date: Mon Nov 12 12:04:32 2007
New Revision: 44020
URL: http://llvm.org/viewvc/llvm-project?rev=44020&view=rev
Log:
In Stmt serialization, renamed directEmit to EmitImpl and
directMaterialize to CreateImpl.
Modified:
cfe/trunk/AST/StmtSerialization.cpp
cfe/trunk/include/clang/AST/Expr.h
cfe/trunk/include/clang/AST/Stmt.h
Modified: cfe/trunk/AST/StmtSerialization.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/StmtSerialization.cpp?rev=44020&r1=44019&r2=44020&view=diff
==============================================================================
--- cfe/trunk/AST/StmtSerialization.cpp (original)
+++ cfe/trunk/AST/StmtSerialization.cpp Mon Nov 12 12:04:32 2007
@@ -23,7 +23,7 @@
void Stmt::Emit(Serializer& S) const {
S.FlushRecord();
S.EmitInt(getStmtClass());
- directEmit(S);
+ EmitImpl(S);
S.FlushRecord();
}
@@ -36,117 +36,117 @@
return NULL;
case AddrLabelExprClass:
- return AddrLabelExpr::directMaterialize(D);
+ return AddrLabelExpr::CreateImpl(D);
case ArraySubscriptExprClass:
- return ArraySubscriptExpr::directMaterialize(D);
+ return ArraySubscriptExpr::CreateImpl(D);
case BinaryOperatorClass:
- return BinaryOperator::directMaterialize(D);
+ return BinaryOperator::CreateImpl(D);
case BreakStmtClass:
- return BreakStmt::directMaterialize(D);
+ return BreakStmt::CreateImpl(D);
case CallExprClass:
- return CallExpr::directMaterialize(D);
+ return CallExpr::CreateImpl(D);
case CaseStmtClass:
- return CaseStmt::directMaterialize(D);
+ return CaseStmt::CreateImpl(D);
case CastExprClass:
- return CastExpr::directMaterialize(D);
+ return CastExpr::CreateImpl(D);
case CharacterLiteralClass:
- return CharacterLiteral::directMaterialize(D);
+ return CharacterLiteral::CreateImpl(D);
case CompoundAssignOperatorClass:
- return CompoundAssignOperator::directMaterialize(D);
+ return CompoundAssignOperator::CreateImpl(D);
case CompoundStmtClass:
- return CompoundStmt::directMaterialize(D);
+ return CompoundStmt::CreateImpl(D);
case ConditionalOperatorClass:
- return ConditionalOperator::directMaterialize(D);
+ return ConditionalOperator::CreateImpl(D);
case ContinueStmtClass:
- return ContinueStmt::directMaterialize(D);
+ return ContinueStmt::CreateImpl(D);
case DeclRefExprClass:
- return DeclRefExpr::directMaterialize(D);
+ return DeclRefExpr::CreateImpl(D);
case DeclStmtClass:
- return DeclStmt::directMaterialize(D);
+ return DeclStmt::CreateImpl(D);
case DefaultStmtClass:
- return DefaultStmt::directMaterialize(D);
+ return DefaultStmt::CreateImpl(D);
case DoStmtClass:
- return DoStmt::directMaterialize(D);
+ return DoStmt::CreateImpl(D);
case FloatingLiteralClass:
- return FloatingLiteral::directMaterialize(D);
+ return FloatingLiteral::CreateImpl(D);
case ForStmtClass:
- return ForStmt::directMaterialize(D);
+ return ForStmt::CreateImpl(D);
case GotoStmtClass:
- return GotoStmt::directMaterialize(D);
+ return GotoStmt::CreateImpl(D);
case IfStmtClass:
- return IfStmt::directMaterialize(D);
+ return IfStmt::CreateImpl(D);
case ImaginaryLiteralClass:
- return ImaginaryLiteral::directMaterialize(D);
+ return ImaginaryLiteral::CreateImpl(D);
case ImplicitCastExprClass:
- return ImplicitCastExpr::directMaterialize(D);
+ return ImplicitCastExpr::CreateImpl(D);
case IndirectGotoStmtClass:
- return IndirectGotoStmt::directMaterialize(D);
+ return IndirectGotoStmt::CreateImpl(D);
case IntegerLiteralClass:
- return IntegerLiteral::directMaterialize(D);
+ return IntegerLiteral::CreateImpl(D);
case LabelStmtClass:
- return LabelStmt::directMaterialize(D);
+ return LabelStmt::CreateImpl(D);
case NullStmtClass:
- return NullStmt::directMaterialize(D);
+ return NullStmt::CreateImpl(D);
case ParenExprClass:
- return ParenExpr::directMaterialize(D);
+ return ParenExpr::CreateImpl(D);
case PreDefinedExprClass:
- return PreDefinedExpr::directMaterialize(D);
+ return PreDefinedExpr::CreateImpl(D);
case ReturnStmtClass:
- return ReturnStmt::directMaterialize(D);
+ return ReturnStmt::CreateImpl(D);
case StmtExprClass:
- return StmtExpr::directMaterialize(D);
+ return StmtExpr::CreateImpl(D);
case StringLiteralClass:
- return StringLiteral::directMaterialize(D);
+ return StringLiteral::CreateImpl(D);
case SwitchStmtClass:
- return SwitchStmt::directMaterialize(D);
+ return SwitchStmt::CreateImpl(D);
case UnaryOperatorClass:
- return UnaryOperator::directMaterialize(D);
+ return UnaryOperator::CreateImpl(D);
case WhileStmtClass:
- return WhileStmt::directMaterialize(D);
+ return WhileStmt::CreateImpl(D);
}
}
-void AddrLabelExpr::directEmit(Serializer& S) const {
+void AddrLabelExpr::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.Emit(AmpAmpLoc);
S.Emit(LabelLoc);
S.EmitPtr(Label);
}
-AddrLabelExpr* AddrLabelExpr::directMaterialize(Deserializer& D) {
+AddrLabelExpr* AddrLabelExpr::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
SourceLocation AALoc = SourceLocation::ReadVal(D);
SourceLocation LLoc = SourceLocation::ReadVal(D);
@@ -155,13 +155,13 @@
return expr;
}
-void ArraySubscriptExpr::directEmit(Serializer& S) const {
+void ArraySubscriptExpr::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.Emit(RBracketLoc);
S.BatchEmitOwnedPtrs(getLHS(),getRHS());
}
-ArraySubscriptExpr* ArraySubscriptExpr::directMaterialize(Deserializer& D) {
+ArraySubscriptExpr* ArraySubscriptExpr::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
SourceLocation L = SourceLocation::ReadVal(D);
Expr *LHS, *RHS;
@@ -169,14 +169,14 @@
return new ArraySubscriptExpr(LHS,RHS,t,L);
}
-void BinaryOperator::directEmit(Serializer& S) const {
+void BinaryOperator::EmitImpl(Serializer& S) const {
S.EmitInt(Opc);
S.Emit(OpLoc);;
S.Emit(getType());
S.BatchEmitOwnedPtrs(getLHS(),getRHS());
}
-BinaryOperator* BinaryOperator::directMaterialize(Deserializer& D) {
+BinaryOperator* BinaryOperator::CreateImpl(Deserializer& D) {
Opcode Opc = static_cast<Opcode>(D.ReadInt());
SourceLocation OpLoc = SourceLocation::ReadVal(D);
QualType Result = QualType::ReadVal(D);
@@ -186,23 +186,23 @@
return new BinaryOperator(LHS,RHS,Opc,Result,OpLoc);
}
-void BreakStmt::directEmit(Serializer& S) const {
+void BreakStmt::EmitImpl(Serializer& S) const {
S.Emit(BreakLoc);
}
-BreakStmt* BreakStmt::directMaterialize(Deserializer& D) {
+BreakStmt* BreakStmt::CreateImpl(Deserializer& D) {
SourceLocation Loc = SourceLocation::ReadVal(D);
return new BreakStmt(Loc);
}
-void CallExpr::directEmit(Serializer& S) const {
+void CallExpr::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.Emit(RParenLoc);
S.EmitInt(NumArgs);
S.BatchEmitOwnedPtrs(NumArgs+1,SubExprs);
}
-CallExpr* CallExpr::directMaterialize(Deserializer& D) {
+CallExpr* CallExpr::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
SourceLocation L = SourceLocation::ReadVal(D);
unsigned NumArgs = D.ReadInt();
@@ -212,13 +212,13 @@
return new CallExpr(SubExprs,NumArgs,t,L);
}
-void CaseStmt::directEmit(Serializer& S) const {
+void CaseStmt::EmitImpl(Serializer& S) const {
S.Emit(CaseLoc);
S.EmitPtr(getNextSwitchCase());
S.BatchEmitOwnedPtrs((unsigned) END_EXPR,&SubExprs[0]);
}
-CaseStmt* CaseStmt::directMaterialize(Deserializer& D) {
+CaseStmt* CaseStmt::CreateImpl(Deserializer& D) {
SourceLocation CaseLoc = SourceLocation::ReadVal(D);
CaseStmt* stmt = new CaseStmt(NULL,NULL,NULL,CaseLoc);
D.ReadPtr(stmt->NextSwitchCase);
@@ -226,13 +226,13 @@
return stmt;
}
-void CastExpr::directEmit(Serializer& S) const {
+void CastExpr::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.Emit(Loc);
S.EmitOwnedPtr(Op);
}
-CastExpr* CastExpr::directMaterialize(Deserializer& D) {
+CastExpr* CastExpr::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
SourceLocation Loc = SourceLocation::ReadVal(D);
Expr* Op = D.ReadOwnedPtr<Expr>();
@@ -240,20 +240,20 @@
}
-void CharacterLiteral::directEmit(Serializer& S) const {
+void CharacterLiteral::EmitImpl(Serializer& S) const {
S.Emit(Value);
S.Emit(Loc);
S.Emit(getType());
}
-CharacterLiteral* CharacterLiteral::directMaterialize(Deserializer& D) {
+CharacterLiteral* CharacterLiteral::CreateImpl(Deserializer& D) {
unsigned value = D.ReadInt();
SourceLocation Loc = SourceLocation::ReadVal(D);
QualType T = QualType::ReadVal(D);
return new CharacterLiteral(value,T,Loc);
}
-void CompoundAssignOperator::directEmit(Serializer& S) const {
+void CompoundAssignOperator::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.Emit(ComputationType);
S.Emit(getOperatorLoc());
@@ -262,7 +262,7 @@
}
CompoundAssignOperator*
-CompoundAssignOperator::directMaterialize(Deserializer& D) {
+CompoundAssignOperator::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
QualType c = QualType::ReadVal(D);
SourceLocation L = SourceLocation::ReadVal(D);
@@ -273,7 +273,7 @@
return new CompoundAssignOperator(LHS,RHS,Opc,t,c,L);
}
-void CompoundStmt::directEmit(Serializer& S) const {
+void CompoundStmt::EmitImpl(Serializer& S) const {
S.Emit(LBracLoc);
S.Emit(RBracLoc);
S.Emit(Body.size());
@@ -282,7 +282,7 @@
S.EmitOwnedPtr(*I);
}
-CompoundStmt* CompoundStmt::directMaterialize(Deserializer& D) {
+CompoundStmt* CompoundStmt::CreateImpl(Deserializer& D) {
SourceLocation LB = SourceLocation::ReadVal(D);
SourceLocation RB = SourceLocation::ReadVal(D);
unsigned size = D.ReadInt();
@@ -297,39 +297,39 @@
return stmt;
}
-void ConditionalOperator::directEmit(Serializer& S) const {
+void ConditionalOperator::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.BatchEmitOwnedPtrs((unsigned) END_EXPR, SubExprs);
}
-ConditionalOperator* ConditionalOperator::directMaterialize(Deserializer& D) {
+ConditionalOperator* ConditionalOperator::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
ConditionalOperator* c = new ConditionalOperator(NULL,NULL,NULL,t);
D.BatchReadOwnedPtrs((unsigned) END_EXPR, c->SubExprs);
return c;
}
-void ContinueStmt::directEmit(Serializer& S) const {
+void ContinueStmt::EmitImpl(Serializer& S) const {
S.Emit(ContinueLoc);
}
-ContinueStmt* ContinueStmt::directMaterialize(Deserializer& D) {
+ContinueStmt* ContinueStmt::CreateImpl(Deserializer& D) {
SourceLocation Loc = SourceLocation::ReadVal(D);
return new ContinueStmt(Loc);
}
-void DeclStmt::directEmit(Serializer& S) const {
+void DeclStmt::EmitImpl(Serializer& S) const {
// FIXME: special handling for struct decls.
S.EmitOwnedPtr(getDecl());
}
-void DeclRefExpr::directEmit(Serializer& S) const {
+void DeclRefExpr::EmitImpl(Serializer& S) const {
S.Emit(Loc);
S.Emit(getType());
S.EmitPtr(getDecl());
}
-DeclRefExpr* DeclRefExpr::directMaterialize(Deserializer& D) {
+DeclRefExpr* DeclRefExpr::CreateImpl(Deserializer& D) {
SourceLocation Loc = SourceLocation::ReadVal(D);
QualType T = QualType::ReadVal(D);
DeclRefExpr* dr = new DeclRefExpr(NULL,T,Loc);
@@ -337,13 +337,13 @@
return dr;
}
-void ObjCIvarRefExpr::directEmit(Serializer& S) const {
+void ObjCIvarRefExpr::EmitImpl(Serializer& S) const {
S.Emit(Loc);
S.Emit(getType());
S.EmitPtr(getDecl());
}
-ObjCIvarRefExpr* ObjCIvarRefExpr::directMaterialize(Deserializer& D) {
+ObjCIvarRefExpr* ObjCIvarRefExpr::CreateImpl(Deserializer& D) {
SourceLocation Loc = SourceLocation::ReadVal(D);
QualType T = QualType::ReadVal(D);
ObjCIvarRefExpr* dr = new ObjCIvarRefExpr(NULL,T,Loc);
@@ -351,18 +351,18 @@
return dr;
}
-DeclStmt* DeclStmt::directMaterialize(Deserializer& D) {
+DeclStmt* DeclStmt::CreateImpl(Deserializer& D) {
ScopedDecl* decl = cast<ScopedDecl>(D.ReadOwnedPtr<Decl>());
return new DeclStmt(decl);
}
-void DefaultStmt::directEmit(Serializer& S) const {
+void DefaultStmt::EmitImpl(Serializer& S) const {
S.Emit(DefaultLoc);
S.EmitOwnedPtr(getSubStmt());
S.EmitPtr(getNextSwitchCase());
}
-DefaultStmt* DefaultStmt::directMaterialize(Deserializer& D) {
+DefaultStmt* DefaultStmt::CreateImpl(Deserializer& D) {
SourceLocation Loc = SourceLocation::ReadVal(D);
Stmt* SubStmt = D.ReadOwnedPtr<Stmt>();
@@ -372,26 +372,26 @@
return stmt;
}
-void DoStmt::directEmit(Serializer& S) const {
+void DoStmt::EmitImpl(Serializer& S) const {
S.Emit(DoLoc);
S.EmitOwnedPtr(getCond());
S.EmitOwnedPtr(getBody());
}
-DoStmt* DoStmt::directMaterialize(Deserializer& D) {
+DoStmt* DoStmt::CreateImpl(Deserializer& D) {
SourceLocation DoLoc = SourceLocation::ReadVal(D);
Expr* Cond = D.ReadOwnedPtr<Expr>();
Stmt* Body = D.ReadOwnedPtr<Stmt>();
return new DoStmt(Body,Cond,DoLoc);
}
-void FloatingLiteral::directEmit(Serializer& S) const {
+void FloatingLiteral::EmitImpl(Serializer& S) const {
S.Emit(Loc);
S.Emit(getType());
S.Emit(Value);
}
-FloatingLiteral* FloatingLiteral::directMaterialize(Deserializer& D) {
+FloatingLiteral* FloatingLiteral::CreateImpl(Deserializer& D) {
SourceLocation Loc = SourceLocation::ReadVal(D);
QualType t = QualType::ReadVal(D);
llvm::APFloat Val = llvm::APFloat::ReadVal(D);
@@ -399,7 +399,7 @@
return expr;
}
-void ForStmt::directEmit(Serializer& S) const {
+void ForStmt::EmitImpl(Serializer& S) const {
S.Emit(ForLoc);
S.EmitOwnedPtr(getInit());
S.EmitOwnedPtr(getCond());
@@ -407,7 +407,7 @@
S.EmitOwnedPtr(getBody());
}
-ForStmt* ForStmt::directMaterialize(Deserializer& D) {
+ForStmt* ForStmt::CreateImpl(Deserializer& D) {
SourceLocation ForLoc = SourceLocation::ReadVal(D);
Stmt* Init = D.ReadOwnedPtr<Stmt>();
Expr* Cond = D.ReadOwnedPtr<Expr>();
@@ -416,13 +416,13 @@
return new ForStmt(Init,Cond,Inc,Body,ForLoc);
}
-void GotoStmt::directEmit(Serializer& S) const {
+void GotoStmt::EmitImpl(Serializer& S) const {
S.Emit(GotoLoc);
S.Emit(LabelLoc);
S.EmitPtr(Label);
}
-GotoStmt* GotoStmt::directMaterialize(Deserializer& D) {
+GotoStmt* GotoStmt::CreateImpl(Deserializer& D) {
SourceLocation GotoLoc = SourceLocation::ReadVal(D);
SourceLocation LabelLoc = SourceLocation::ReadVal(D);
GotoStmt* stmt = new GotoStmt(NULL,GotoLoc,LabelLoc);
@@ -430,14 +430,14 @@
return stmt;
}
-void IfStmt::directEmit(Serializer& S) const {
+void IfStmt::EmitImpl(Serializer& S) const {
S.Emit(IfLoc);
S.EmitOwnedPtr(getCond());
S.EmitOwnedPtr(getThen());
S.EmitOwnedPtr(getElse());
}
-IfStmt* IfStmt::directMaterialize(Deserializer& D) {
+IfStmt* IfStmt::CreateImpl(Deserializer& D) {
SourceLocation L = SourceLocation::ReadVal(D);
Expr* Cond = D.ReadOwnedPtr<Expr>();
Stmt* Then = D.ReadOwnedPtr<Stmt>();
@@ -445,45 +445,45 @@
return new IfStmt(L,Cond,Then,Else);
}
-void ImaginaryLiteral::directEmit(Serializer& S) const {
+void ImaginaryLiteral::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.EmitOwnedPtr(Val);
}
-ImaginaryLiteral* ImaginaryLiteral::directMaterialize(Deserializer& D) {
+ImaginaryLiteral* ImaginaryLiteral::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
Expr* expr = D.ReadOwnedPtr<Expr>();
assert (isa<FloatingLiteral>(expr) || isa<IntegerLiteral>(expr));
return new ImaginaryLiteral(expr,t);
}
-void ImplicitCastExpr::directEmit(Serializer& S) const {
+void ImplicitCastExpr::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.EmitOwnedPtr(Op);
}
-ImplicitCastExpr* ImplicitCastExpr::directMaterialize(Deserializer& D) {
+ImplicitCastExpr* ImplicitCastExpr::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
Expr* Op = D.ReadOwnedPtr<Expr>();
return new ImplicitCastExpr(t,Op);
}
-void IndirectGotoStmt::directEmit(Serializer& S) const {
+void IndirectGotoStmt::EmitImpl(Serializer& S) const {
S.EmitOwnedPtr(Target);
}
-IndirectGotoStmt* IndirectGotoStmt::directMaterialize(Deserializer& D) {
+IndirectGotoStmt* IndirectGotoStmt::CreateImpl(Deserializer& D) {
Expr* Target = D.ReadOwnedPtr<Expr>();
return new IndirectGotoStmt(Target);
}
-void IntegerLiteral::directEmit(Serializer& S) const {
+void IntegerLiteral::EmitImpl(Serializer& S) const {
S.Emit(Loc);
S.Emit(getType());
S.Emit(getValue());
}
-IntegerLiteral* IntegerLiteral::directMaterialize(Deserializer& D) {
+IntegerLiteral* IntegerLiteral::CreateImpl(Deserializer& D) {
SourceLocation Loc = SourceLocation::ReadVal(D);
QualType T = QualType::ReadVal(D);
@@ -496,73 +496,73 @@
return expr;
}
-void LabelStmt::directEmit(Serializer& S) const {
+void LabelStmt::EmitImpl(Serializer& S) const {
S.EmitPtr(Label);
S.Emit(IdentLoc);
S.EmitOwnedPtr(SubStmt);
}
-LabelStmt* LabelStmt::directMaterialize(Deserializer& D) {
+LabelStmt* LabelStmt::CreateImpl(Deserializer& D) {
IdentifierInfo* Label = D.ReadPtr<IdentifierInfo>();
SourceLocation IdentLoc = SourceLocation::ReadVal(D);
Stmt* SubStmt = D.ReadOwnedPtr<Stmt>();
return new LabelStmt(IdentLoc,Label,SubStmt);
}
-void NullStmt::directEmit(Serializer& S) const {
+void NullStmt::EmitImpl(Serializer& S) const {
S.Emit(SemiLoc);
}
-NullStmt* NullStmt::directMaterialize(Deserializer& D) {
+NullStmt* NullStmt::CreateImpl(Deserializer& D) {
SourceLocation SemiLoc = SourceLocation::ReadVal(D);
return new NullStmt(SemiLoc);
}
-void ParenExpr::directEmit(Serializer& S) const {
+void ParenExpr::EmitImpl(Serializer& S) const {
S.Emit(L);
S.Emit(R);
S.EmitOwnedPtr(Val);
}
-ParenExpr* ParenExpr::directMaterialize(Deserializer& D) {
+ParenExpr* ParenExpr::CreateImpl(Deserializer& D) {
SourceLocation L = SourceLocation::ReadVal(D);
SourceLocation R = SourceLocation::ReadVal(D);
Expr* val = D.ReadOwnedPtr<Expr>();
return new ParenExpr(L,R,val);
}
-void PreDefinedExpr::directEmit(Serializer& S) const {
+void PreDefinedExpr::EmitImpl(Serializer& S) const {
S.Emit(Loc);
S.EmitInt(getIdentType());
S.Emit(getType());
}
-PreDefinedExpr* PreDefinedExpr::directMaterialize(Deserializer& D) {
+PreDefinedExpr* PreDefinedExpr::CreateImpl(Deserializer& D) {
SourceLocation Loc = SourceLocation::ReadVal(D);
IdentType it = static_cast<IdentType>(D.ReadInt());
QualType Q = QualType::ReadVal(D);
return new PreDefinedExpr(Loc,Q,it);
}
-void ReturnStmt::directEmit(Serializer& S) const {
+void ReturnStmt::EmitImpl(Serializer& S) const {
S.Emit(RetLoc);
S.EmitOwnedPtr(RetExpr);
}
-ReturnStmt* ReturnStmt::directMaterialize(Deserializer& D) {
+ReturnStmt* ReturnStmt::CreateImpl(Deserializer& D) {
SourceLocation RetLoc = SourceLocation::ReadVal(D);
Expr* RetExpr = D.ReadOwnedPtr<Expr>();
return new ReturnStmt(RetLoc,RetExpr);
}
-void StmtExpr::directEmit(Serializer& S) const {
+void StmtExpr::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.Emit(LParenLoc);
S.Emit(RParenLoc);
S.EmitOwnedPtr(SubStmt);
}
-StmtExpr* StmtExpr::directMaterialize(Deserializer& D) {
+StmtExpr* StmtExpr::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
SourceLocation L = SourceLocation::ReadVal(D);
SourceLocation R = SourceLocation::ReadVal(D);
@@ -570,7 +570,7 @@
return new StmtExpr(SubStmt,t,L,R);
}
-void StringLiteral::directEmit(Serializer& S) const {
+void StringLiteral::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.Emit(firstTokLoc);
S.Emit(lastTokLoc);
@@ -581,7 +581,7 @@
S.EmitInt(StrData[i]);
}
-StringLiteral* StringLiteral::directMaterialize(Deserializer& D) {
+StringLiteral* StringLiteral::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
SourceLocation firstTokLoc = SourceLocation::ReadVal(D);
SourceLocation lastTokLoc = SourceLocation::ReadVal(D);
@@ -600,14 +600,14 @@
return sl;
}
-void SwitchStmt::directEmit(Serializer& S) const {
+void SwitchStmt::EmitImpl(Serializer& S) const {
S.Emit(SwitchLoc);
S.EmitOwnedPtr(getCond());
S.EmitOwnedPtr(getBody());
S.EmitPtr(FirstCase);
}
-SwitchStmt* SwitchStmt::directMaterialize(Deserializer& D) {
+SwitchStmt* SwitchStmt::CreateImpl(Deserializer& D) {
SourceLocation Loc = SourceLocation::ReadVal(D);
Stmt* Cond = D.ReadOwnedPtr<Stmt>();
Stmt* Body = D.ReadOwnedPtr<Stmt>();
@@ -620,14 +620,14 @@
return stmt;
}
-void UnaryOperator::directEmit(Serializer& S) const {
+void UnaryOperator::EmitImpl(Serializer& S) const {
S.Emit(getType());
S.Emit(Loc);
S.EmitInt(Opc);
S.EmitOwnedPtr(Val);
}
-UnaryOperator* UnaryOperator::directMaterialize(Deserializer& D) {
+UnaryOperator* UnaryOperator::CreateImpl(Deserializer& D) {
QualType t = QualType::ReadVal(D);
SourceLocation L = SourceLocation::ReadVal(D);
Opcode Opc = static_cast<Opcode>(D.ReadInt());
@@ -635,13 +635,13 @@
return new UnaryOperator(Val,Opc,t,L);
}
-void WhileStmt::directEmit(Serializer& S) const {
+void WhileStmt::EmitImpl(Serializer& S) const {
S.Emit(WhileLoc);
S.EmitOwnedPtr(getCond());
S.EmitOwnedPtr(getBody());
}
-WhileStmt* WhileStmt::directMaterialize(Deserializer& D) {
+WhileStmt* WhileStmt::CreateImpl(Deserializer& D) {
SourceLocation WhileLoc = SourceLocation::ReadVal(D);
Expr* Cond = D.ReadOwnedPtr<Expr>();
Stmt* Body = D.ReadOwnedPtr<Stmt>();
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=44020&r1=44019&r2=44020&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Mon Nov 12 12:04:32 2007
@@ -143,8 +143,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static DeclRefExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static DeclRefExpr* CreateImpl(llvm::Deserializer& D);
};
/// PreDefinedExpr - [C99 6.4.2.2] - A pre-defined identifier such as __func__.
@@ -176,8 +176,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static PreDefinedExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static PreDefinedExpr* CreateImpl(llvm::Deserializer& D);
};
class IntegerLiteral : public Expr {
@@ -202,8 +202,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static IntegerLiteral* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static IntegerLiteral* CreateImpl(llvm::Deserializer& D);
};
class CharacterLiteral : public Expr {
@@ -229,8 +229,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static CharacterLiteral* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static CharacterLiteral* CreateImpl(llvm::Deserializer& D);
};
class FloatingLiteral : public Expr {
@@ -264,8 +264,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static FloatingLiteral* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static FloatingLiteral* CreateImpl(llvm::Deserializer& D);
};
/// ImaginaryLiteral - We support imaginary integer and floating point literals,
@@ -292,8 +292,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static ImaginaryLiteral* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static ImaginaryLiteral* CreateImpl(llvm::Deserializer& D);
};
/// StringLiteral - This represents a string literal expression, e.g. "foo"
@@ -329,8 +329,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static StringLiteral* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static StringLiteral* CreateImpl(llvm::Deserializer& D);
};
/// ParenExpr - This represents a parethesized expression, e.g. "(1)". This
@@ -355,8 +355,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static ParenExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static ParenExpr* CreateImpl(llvm::Deserializer& D);
};
@@ -432,8 +432,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static UnaryOperator* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static UnaryOperator* CreateImpl(llvm::Deserializer& D);
};
/// SizeOfAlignOfTypeExpr - [C99 6.5.3.4] - This is only for sizeof/alignof of
@@ -524,8 +524,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static ArraySubscriptExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static ArraySubscriptExpr* CreateImpl(llvm::Deserializer& D);
};
@@ -590,8 +590,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static CallExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static CallExpr* CreateImpl(llvm::Deserializer& D);
};
/// MemberExpr - [C99 6.5.2.3] Structure and Union Members.
@@ -736,8 +736,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static ImplicitCastExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static ImplicitCastExpr* CreateImpl(llvm::Deserializer& D);
};
/// CastExpr - [C99 6.5.4] Cast Operators.
@@ -765,8 +765,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static CastExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static CastExpr* CreateImpl(llvm::Deserializer& D);
};
class BinaryOperator : public Expr {
@@ -842,8 +842,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static BinaryOperator* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static BinaryOperator* CreateImpl(llvm::Deserializer& D);
protected:
BinaryOperator(Expr *lhs, Expr *rhs, Opcode opc, QualType ResTy,
@@ -879,8 +879,8 @@
return S->getStmtClass() == CompoundAssignOperatorClass;
}
- virtual void directEmit(llvm::Serializer& S) const;
- static CompoundAssignOperator* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static CompoundAssignOperator* CreateImpl(llvm::Deserializer& D);
};
/// ConditionalOperator - The ?: operator. Note that LHS may be null when the
@@ -913,8 +913,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static ConditionalOperator* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static ConditionalOperator* CreateImpl(llvm::Deserializer& D);
};
/// AddrLabelExpr - The GNU address of label extension, representing &&label.
@@ -941,8 +941,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static AddrLabelExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static AddrLabelExpr* CreateImpl(llvm::Deserializer& D);
};
/// StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}).
@@ -972,8 +972,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static StmtExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static StmtExpr* CreateImpl(llvm::Deserializer& D);
};
/// TypesCompatibleExpr - GNU builtin-in function __builtin_type_compatible_p.
@@ -1251,8 +1251,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static ObjCIvarRefExpr* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static ObjCIvarRefExpr* CreateImpl(llvm::Deserializer& D);
};
class ObjCMessageExpr : public Expr {
Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=44020&r1=44019&r2=44020&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Mon Nov 12 12:04:32 2007
@@ -117,7 +117,7 @@
void Emit(llvm::Serializer& S) const;
static Stmt* Materialize(llvm::Deserializer& D);
- virtual void directEmit(llvm::Serializer& S) const {
+ virtual void EmitImpl(llvm::Serializer& S) const {
// This method will eventually be a pure-virtual function.
assert (false && "Not implemented.");
}
@@ -147,8 +147,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static DeclStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static DeclStmt* CreateImpl(llvm::Deserializer& D);
};
/// NullStmt - This is the null statement ";": C99 6.8.3p3.
@@ -171,8 +171,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static NullStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static NullStmt* CreateImpl(llvm::Deserializer& D);
};
/// CompoundStmt - This represents a group of statements like { stmt stmt }.
@@ -225,8 +225,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static CompoundStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static CompoundStmt* CreateImpl(llvm::Deserializer& D);
};
// SwitchCase is the base class for CaseStmt and DefaultStmt,
@@ -297,8 +297,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static CaseStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static CaseStmt* CreateImpl(llvm::Deserializer& D);
};
class DefaultStmt : public SwitchCase {
@@ -326,8 +326,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static DefaultStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static DefaultStmt* CreateImpl(llvm::Deserializer& D);
};
class LabelStmt : public Stmt {
@@ -360,8 +360,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static LabelStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static LabelStmt* CreateImpl(llvm::Deserializer& D);
};
@@ -404,8 +404,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static IfStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static IfStmt* CreateImpl(llvm::Deserializer& D);
};
/// SwitchStmt - This represents a 'switch' stmt.
@@ -452,8 +452,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static SwitchStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static SwitchStmt* CreateImpl(llvm::Deserializer& D);
};
@@ -487,8 +487,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static WhileStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static WhileStmt* CreateImpl(llvm::Deserializer& D);
};
/// DoStmt - This represents a 'do/while' stmt.
@@ -522,8 +522,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static DoStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static DoStmt* CreateImpl(llvm::Deserializer& D);
};
@@ -567,8 +567,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static ForStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static ForStmt* CreateImpl(llvm::Deserializer& D);
};
/// GotoStmt - This represents a direct goto.
@@ -595,8 +595,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static GotoStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static GotoStmt* CreateImpl(llvm::Deserializer& D);
};
/// IndirectGotoStmt - This represents an indirect goto.
@@ -622,8 +622,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static IndirectGotoStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static IndirectGotoStmt* CreateImpl(llvm::Deserializer& D);
};
@@ -646,8 +646,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static ContinueStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static ContinueStmt* CreateImpl(llvm::Deserializer& D);
};
/// BreakStmt - This represents a break.
@@ -668,8 +668,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static BreakStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static BreakStmt* CreateImpl(llvm::Deserializer& D);
};
@@ -696,8 +696,8 @@
virtual child_iterator child_begin();
virtual child_iterator child_end();
- virtual void directEmit(llvm::Serializer& S) const;
- static ReturnStmt* directMaterialize(llvm::Deserializer& D);
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static ReturnStmt* CreateImpl(llvm::Deserializer& D);
};
/// AsmStmt - This represents a GNU inline-assembly statement extension.
More information about the cfe-commits
mailing list