Implemented serialization of CharacterLiteral.

llvm-svn: 43824
This commit is contained in:
Ted Kremenek 2007-11-07 17:15:49 +00:00
parent 3c58662411
commit c874c6a959
2 changed files with 19 additions and 0 deletions

View File

@ -40,6 +40,9 @@ Stmt* Stmt::Materialize(llvm::Deserializer& D) {
case CaseStmtClass:
return CaseStmt::directMaterialize(D);
case CharacterLiteralClass:
return CharacterLiteral::directMaterialize(D);
case CompoundStmtClass:
return CompoundStmt::directMaterialize(D);
@ -142,6 +145,19 @@ CaseStmt* CaseStmt::directMaterialize(llvm::Deserializer& D) {
return stmt;
}
void CharacterLiteral::directEmit(llvm::Serializer& S) const {
S.Emit(Value);
S.Emit(Loc);
S.Emit(getType());
}
CharacterLiteral* CharacterLiteral::directMaterialize(llvm::Deserializer& D) {
unsigned value = D.ReadInt();
SourceLocation Loc = SourceLocation::ReadVal(D);
QualType T = QualType::ReadVal(D);
return new CharacterLiteral(value,T,Loc);
}
void CompoundStmt::directEmit(llvm::Serializer& S) const {
S.Emit(LBracLoc);
S.Emit(RBracLoc);

View File

@ -228,6 +228,9 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
virtual void directEmit(llvm::Serializer& S) const;
static CharacterLiteral* directMaterialize(llvm::Deserializer& D);
};
class FloatingLiteral : public Expr {