return ImplicitCastExpr::CreateImpl(D);
case IndirectGotoStmtClass:
- return IndirectGotoStmt::CreateImpl(D);
+ return IndirectGotoStmt::CreateImpl(D);
+
+ case InitListExprClass:
+ return InitListExpr::CreateImpl(D);
case IntegerLiteralClass:
return IntegerLiteral::CreateImpl(D);
return new IndirectGotoStmt(Target);
}
+void InitListExpr::EmitImpl(Serializer& S) const {
+ S.Emit(LBraceLoc);
+ S.Emit(RBraceLoc);
+ S.EmitInt(NumInits);
+ S.BatchEmitOwnedPtrs(NumInits,InitExprs);
+}
+
+InitListExpr* InitListExpr::CreateImpl(Deserializer& D) {
+ InitListExpr* expr = new InitListExpr();
+ expr->LBraceLoc = SourceLocation::ReadVal(D);
+ expr->RBraceLoc = SourceLocation::ReadVal(D);
+ expr->NumInits = D.ReadInt();
+ assert(expr->NumInits);
+ expr->InitExprs = new Expr*[expr->NumInits];
+ D.BatchReadOwnedPtrs(expr->NumInits,expr->InitExprs);
+ return expr;
+}
+
void IntegerLiteral::EmitImpl(Serializer& S) const {
S.Emit(Loc);
S.Emit(getType());
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
+
+ virtual void EmitImpl(llvm::Serializer& S) const;
+ static InitListExpr* CreateImpl(llvm::Deserializer& D);
+
+private:
+ // Used by serializer.
+ InitListExpr() : Expr(InitListExprClass, QualType()),
+ InitExprs(NULL), NumInits(0) {}
};
/// ObjCStringLiteral, used for Objective-C string literals