forked from OSchip/llvm-project
Implemented serialiation of PreDefinedExpr.
llvm-svn: 43823
This commit is contained in:
parent
d47c8125a1
commit
3c58662411
|
@ -82,6 +82,9 @@ Stmt* Stmt::Materialize(llvm::Deserializer& D) {
|
||||||
case ParenExprClass:
|
case ParenExprClass:
|
||||||
return ParenExpr::directMaterialize(D);
|
return ParenExpr::directMaterialize(D);
|
||||||
|
|
||||||
|
case PreDefinedExprClass:
|
||||||
|
return PreDefinedExpr::directMaterialize(D);
|
||||||
|
|
||||||
case ReturnStmtClass:
|
case ReturnStmtClass:
|
||||||
return ReturnStmt::directMaterialize(D);
|
return ReturnStmt::directMaterialize(D);
|
||||||
|
|
||||||
|
@ -335,6 +338,19 @@ ParenExpr* ParenExpr::directMaterialize(llvm::Deserializer& D) {
|
||||||
return new ParenExpr(L,R,val);
|
return new ParenExpr(L,R,val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PreDefinedExpr::directEmit(llvm::Serializer& S) const {
|
||||||
|
S.Emit(Loc);
|
||||||
|
S.EmitInt(getIdentType());
|
||||||
|
S.Emit(getType());
|
||||||
|
}
|
||||||
|
|
||||||
|
PreDefinedExpr* PreDefinedExpr::directMaterialize(llvm::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(llvm::Serializer& S) const {
|
void ReturnStmt::directEmit(llvm::Serializer& S) const {
|
||||||
S.Emit(RetLoc);
|
S.Emit(RetLoc);
|
||||||
S.EmitOwnedPtr(RetExpr);
|
S.EmitOwnedPtr(RetExpr);
|
||||||
|
|
|
@ -175,6 +175,9 @@ public:
|
||||||
// Iterators
|
// Iterators
|
||||||
virtual child_iterator child_begin();
|
virtual child_iterator child_begin();
|
||||||
virtual child_iterator child_end();
|
virtual child_iterator child_end();
|
||||||
|
|
||||||
|
virtual void directEmit(llvm::Serializer& S) const;
|
||||||
|
static PreDefinedExpr* directMaterialize(llvm::Deserializer& D);
|
||||||
};
|
};
|
||||||
|
|
||||||
class IntegerLiteral : public Expr {
|
class IntegerLiteral : public Expr {
|
||||||
|
|
Loading…
Reference in New Issue