aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/StmtSerialization.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-09-03 00:27:26 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-09-03 00:27:26 +0000
commite66f4e3e3ae9d7d11b0c302211066fad69228aba (patch)
treeebf694ed165de059748450009d609ec820a3be27 /lib/AST/StmtSerialization.cpp
parent7e8cc57bad2b670b0a3b48fa3d84dce79b5c7288 (diff)
Fix ObjCPropertRefExpr to be able to encode all the information for
uses which refer to methods not properties. - Not yet wired in Sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtSerialization.cpp')
-rw-r--r--lib/AST/StmtSerialization.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp
index 1c61b66512..23879ee63b 100644
--- a/lib/AST/StmtSerialization.cpp
+++ b/lib/AST/StmtSerialization.cpp
@@ -998,7 +998,14 @@ ObjCIvarRefExpr* ObjCIvarRefExpr::CreateImpl(Deserializer& D, ASTContext& C) {
void ObjCPropertyRefExpr::EmitImpl(Serializer& S) const {
S.Emit(Loc);
S.Emit(getType());
- S.EmitPtr(getDecl());
+ unsigned Kind = getKind();
+ S.Emit(Kind);
+ if (Kind == PropertyRef) {
+ S.EmitPtr(getProperty());
+ } else {
+ S.EmitPtr(getGetterMethod());
+ S.EmitPtr(getSetterMethod());
+ }
}
ObjCPropertyRefExpr* ObjCPropertyRefExpr::CreateImpl(Deserializer& D,
@@ -1006,7 +1013,13 @@ ObjCPropertyRefExpr* ObjCPropertyRefExpr::CreateImpl(Deserializer& D,
SourceLocation Loc = SourceLocation::ReadVal(D);
QualType T = QualType::ReadVal(D);
ObjCPropertyRefExpr* dr = new ObjCPropertyRefExpr(NULL,T,Loc,0);
- D.ReadPtr(dr->D,false);
+ unsigned Kind = D.ReadInt();
+ if (Kind == PropertyRef) {
+ D.ReadPtr(dr->Referent.AsProperty,false);
+ } else {
+ D.ReadPtr(dr->Referent.AsMethod.Setter,false);
+ D.ReadPtr(dr->Referent.AsMethod.Getter,false);
+ }
return dr;
}