diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-11-04 14:56:14 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-11-04 14:56:14 +0000 |
commit | cd9b46e5442a3ef17f83f75177d8545cb5b3e2b9 (patch) | |
tree | c4982037cbe80fc24de02eab44941ae4cf7cd701 /lib/AST/StmtSerialization.cpp | |
parent | 796da18402f286b897782a298ae3b20c459c102e (diff) |
Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtSerialization.cpp')
-rw-r--r-- | lib/AST/StmtSerialization.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp index aefaee38a4..09aaceffda 100644 --- a/lib/AST/StmtSerialization.cpp +++ b/lib/AST/StmtSerialization.cpp @@ -191,6 +191,9 @@ Stmt* Stmt::Create(Deserializer& D, ASTContext& C) { case ObjCStringLiteralClass: return ObjCStringLiteral::CreateImpl(D, C); + case ObjCSuperExprClass: + return ObjCSuperExpr::CreateImpl(D, C); + //==--------------------------------------==// // C++ //==--------------------------------------==// @@ -1232,6 +1235,17 @@ ObjCStringLiteral* ObjCStringLiteral::CreateImpl(Deserializer& D, ASTContext& C) return new ObjCStringLiteral(String,T,L); } +void ObjCSuperExpr::EmitImpl(llvm::Serializer& S) const { + S.Emit(getType()); + S.Emit(Loc); +} + +ObjCSuperExpr* ObjCSuperExpr::CreateImpl(llvm::Deserializer& D, ASTContext&) { + QualType Ty = QualType::ReadVal(D); + SourceLocation Loc = SourceLocation::ReadVal(D); + return new ObjCSuperExpr(Loc, Ty); +} + //===----------------------------------------------------------------------===// // Serialization for Clang Extensions. //===----------------------------------------------------------------------===// |