forked from OSchip/llvm-project
Implemented serialization of CharacterLiteral.
llvm-svn: 43824
This commit is contained in:
parent
3c58662411
commit
c874c6a959
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue