forked from OSchip/llvm-project
Implemented serialization of ImplicitCastExpr.
llvm-svn: 43847
This commit is contained in:
parent
9d2bf704de
commit
b2b5e73f89
clang
|
@ -22,6 +22,7 @@ void Stmt::Emit(llvm::Serializer& S) const {
|
|||
S.FlushRecord();
|
||||
S.EmitInt(getStmtClass());
|
||||
directEmit(S);
|
||||
S.FlushRecord();
|
||||
}
|
||||
|
||||
Stmt* Stmt::Materialize(llvm::Deserializer& D) {
|
||||
|
@ -77,6 +78,9 @@ Stmt* Stmt::Materialize(llvm::Deserializer& D) {
|
|||
case ImaginaryLiteralClass:
|
||||
return ImaginaryLiteral::directMaterialize(D);
|
||||
|
||||
case ImplicitCastExprClass:
|
||||
return ImplicitCastExpr::directMaterialize(D);
|
||||
|
||||
case IndirectGotoStmtClass:
|
||||
return IndirectGotoStmt::directMaterialize(D);
|
||||
|
||||
|
@ -323,6 +327,17 @@ ImaginaryLiteral* ImaginaryLiteral::directMaterialize(llvm::Deserializer& D) {
|
|||
return new ImaginaryLiteral(expr,t);
|
||||
}
|
||||
|
||||
void ImplicitCastExpr::directEmit(llvm::Serializer& S) const {
|
||||
S.Emit(getType());
|
||||
S.EmitOwnedPtr(Op);
|
||||
}
|
||||
|
||||
ImplicitCastExpr* ImplicitCastExpr::directMaterialize(llvm::Deserializer& D) {
|
||||
QualType t = QualType::ReadVal(D);
|
||||
Expr* Op = D.ReadOwnedPtr<Expr>();
|
||||
return new ImplicitCastExpr(t,Op);
|
||||
}
|
||||
|
||||
void IndirectGotoStmt::directEmit(llvm::Serializer& S) const {
|
||||
S.EmitPtr(Target);
|
||||
}
|
||||
|
|
|
@ -719,6 +719,9 @@ public:
|
|||
// Iterators
|
||||
virtual child_iterator child_begin();
|
||||
virtual child_iterator child_end();
|
||||
|
||||
virtual void directEmit(llvm::Serializer& S) const;
|
||||
static ImplicitCastExpr* directMaterialize(llvm::Deserializer& D);
|
||||
};
|
||||
|
||||
/// CastExpr - [C99 6.5.4] Cast Operators.
|
||||
|
|
Loading…
Reference in New Issue