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:
|
case CaseStmtClass:
|
||||||
return CaseStmt::directMaterialize(D);
|
return CaseStmt::directMaterialize(D);
|
||||||
|
|
||||||
|
case CharacterLiteralClass:
|
||||||
|
return CharacterLiteral::directMaterialize(D);
|
||||||
|
|
||||||
case CompoundStmtClass:
|
case CompoundStmtClass:
|
||||||
return CompoundStmt::directMaterialize(D);
|
return CompoundStmt::directMaterialize(D);
|
||||||
|
|
||||||
|
@ -142,6 +145,19 @@ CaseStmt* CaseStmt::directMaterialize(llvm::Deserializer& D) {
|
||||||
return stmt;
|
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 {
|
void CompoundStmt::directEmit(llvm::Serializer& S) const {
|
||||||
S.Emit(LBracLoc);
|
S.Emit(LBracLoc);
|
||||||
S.Emit(RBracLoc);
|
S.Emit(RBracLoc);
|
||||||
|
|
|
@ -228,6 +228,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 CharacterLiteral* directMaterialize(llvm::Deserializer& D);
|
||||||
};
|
};
|
||||||
|
|
||||||
class FloatingLiteral : public Expr {
|
class FloatingLiteral : public Expr {
|
||||||
|
|
Loading…
Reference in New Issue