[cfe-commits] r79371 - in /cfe/trunk: include/clang/AST/ExprObjC.h lib/AST/StmtProfile.cpp lib/CodeGen/CGObjC.cpp lib/Frontend/PCHReaderStmt.cpp lib/Frontend/PCHWriterStmt.cpp
Fariborz Jahanian
fjahanian at apple.com
Tue Aug 18 14:37:34 PDT 2009
Author: fjahanian
Date: Tue Aug 18 16:37:33 2009
New Revision: 79371
URL: http://llvm.org/viewvc/llvm-project?rev=79371&view=rev
Log:
Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.
Modified:
cfe/trunk/include/clang/AST/ExprObjC.h
cfe/trunk/lib/AST/StmtProfile.cpp
cfe/trunk/lib/CodeGen/CGObjC.cpp
cfe/trunk/lib/Frontend/PCHReaderStmt.cpp
cfe/trunk/lib/Frontend/PCHWriterStmt.cpp
Modified: cfe/trunk/include/clang/AST/ExprObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ExprObjC.h?rev=79371&r1=79370&r2=79371&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ExprObjC.h (original)
+++ cfe/trunk/include/clang/AST/ExprObjC.h Tue Aug 18 16:37:33 2009
@@ -279,7 +279,7 @@
SourceLocation Loc;
// FIXME: Swizzle these into a single pointer.
Stmt *Base;
- ObjCInterfaceDecl *ClassProp;
+ ObjCInterfaceDecl *InterfaceDecl;
SourceLocation ClassLoc;
public:
@@ -288,7 +288,7 @@
ObjCMethodDecl *setter,
SourceLocation l, Expr *base)
: Expr(ObjCImplctSetterGetterRefExprClass, t), Setter(setter),
- Getter(getter), Loc(l), Base(base), ClassProp(0),
+ Getter(getter), Loc(l), Base(base), InterfaceDecl(0),
ClassLoc(SourceLocation()) {
}
ObjCImplctSetterGetterRefExpr(ObjCMethodDecl *getter,
@@ -296,17 +296,17 @@
ObjCMethodDecl *setter,
SourceLocation l, ObjCInterfaceDecl *C, SourceLocation CL)
: Expr(ObjCImplctSetterGetterRefExprClass, t), Setter(setter),
- Getter(getter), Loc(l), Base(0), ClassProp(C), ClassLoc(CL) {
+ Getter(getter), Loc(l), Base(0), InterfaceDecl(C), ClassLoc(CL) {
}
explicit ObjCImplctSetterGetterRefExpr(EmptyShell Empty)
: Expr(ObjCImplctSetterGetterRefExprClass, Empty){}
ObjCMethodDecl *getGetterMethod() const { return Getter; }
ObjCMethodDecl *getSetterMethod() const { return Setter; }
- ObjCInterfaceDecl *getClassProp() const { return ClassProp; }
+ ObjCInterfaceDecl *getInterfaceDecl() const { return InterfaceDecl; }
void setGetterMethod(ObjCMethodDecl *D) { Getter = D; }
void setSetterMethod(ObjCMethodDecl *D) { Setter = D; }
- void setClassProp(ObjCInterfaceDecl *D) { ClassProp = D; }
+ void setInterfaceDecl(ObjCInterfaceDecl *D) { InterfaceDecl = D; }
virtual SourceRange getSourceRange() const {
if (Base)
Modified: cfe/trunk/lib/AST/StmtProfile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtProfile.cpp?rev=79371&r1=79370&r2=79371&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtProfile.cpp (original)
+++ cfe/trunk/lib/AST/StmtProfile.cpp Tue Aug 18 16:37:33 2009
@@ -588,7 +588,7 @@
VisitExpr(S);
VisitDecl(S->getGetterMethod());
VisitDecl(S->getSetterMethod());
- VisitDecl(S->getClassProp());
+ VisitDecl(S->getInterfaceDecl());
}
void StmtProfiler::VisitObjCMessageExpr(ObjCMessageExpr *S) {
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=79371&r1=79370&r2=79371&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Tue Aug 18 16:37:33 2009
@@ -341,8 +341,8 @@
cast<ObjCImplctSetterGetterRefExpr>(Exp);
Selector S = KE->getGetterMethod()->getSelector();
llvm::Value *Receiver;
- if (KE->getClassProp()) {
- const ObjCInterfaceDecl *OID = KE->getClassProp();
+ if (KE->getInterfaceDecl()) {
+ const ObjCInterfaceDecl *OID = KE->getInterfaceDecl();
Receiver = CGM.getObjCRuntime().GetClass(Builder, OID);
} else if (isa<ObjCSuperExpr>(KE->getBase()))
return EmitObjCSuperPropertyGet(KE, S);
@@ -351,7 +351,7 @@
return CGM.getObjCRuntime().
GenerateMessageSend(*this, Exp->getType(), S,
Receiver,
- KE->getClassProp() != 0, CallArgList());
+ KE->getInterfaceDecl() != 0, CallArgList());
}
}
@@ -394,8 +394,8 @@
Selector S = E->getSetterMethod()->getSelector();
CallArgList Args;
llvm::Value *Receiver;
- if (E->getClassProp()) {
- const ObjCInterfaceDecl *OID = E->getClassProp();
+ if (E->getInterfaceDecl()) {
+ const ObjCInterfaceDecl *OID = E->getInterfaceDecl();
Receiver = CGM.getObjCRuntime().GetClass(Builder, OID);
} else if (isa<ObjCSuperExpr>(E->getBase())) {
EmitObjCSuperPropertySet(E, S, Src);
@@ -405,7 +405,7 @@
Args.push_back(std::make_pair(Src, E->getType()));
CGM.getObjCRuntime().GenerateMessageSend(*this, getContext().VoidTy, S,
Receiver,
- E->getClassProp() != 0, Args);
+ E->getInterfaceDecl() != 0, Args);
} else
assert (0 && "bad expression node in EmitObjCPropertySet");
}
Modified: cfe/trunk/lib/Frontend/PCHReaderStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReaderStmt.cpp?rev=79371&r1=79370&r2=79371&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReaderStmt.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReaderStmt.cpp Tue Aug 18 16:37:33 2009
@@ -749,7 +749,7 @@
cast_or_null<ObjCMethodDecl>(Reader.GetDecl(Record[Idx++])));
E->setSetterMethod(
cast_or_null<ObjCMethodDecl>(Reader.GetDecl(Record[Idx++])));
- E->setClassProp(
+ E->setInterfaceDecl(
cast_or_null<ObjCInterfaceDecl>(Reader.GetDecl(Record[Idx++])));
E->setBase(cast_or_null<Expr>(StmtStack.back()));
E->setLocation(SourceLocation::getFromRawEncoding(Record[Idx++]));
Modified: cfe/trunk/lib/Frontend/PCHWriterStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriterStmt.cpp?rev=79371&r1=79370&r2=79371&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriterStmt.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriterStmt.cpp Tue Aug 18 16:37:33 2009
@@ -679,8 +679,8 @@
Writer.AddDeclRef(E->getGetterMethod(), Record);
Writer.AddDeclRef(E->getSetterMethod(), Record);
- // NOTE: ClassProp and Base are mutually exclusive.
- Writer.AddDeclRef(E->getClassProp(), Record);
+ // NOTE: InterfaceDecl and Base are mutually exclusive.
+ Writer.AddDeclRef(E->getInterfaceDecl(), Record);
Writer.WriteSubStmt(E->getBase());
Writer.AddSourceLocation(E->getLocation(), Record);
Writer.AddSourceLocation(E->getClassLoc(), Record);
More information about the cfe-commits
mailing list