diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-03-30 16:11:20 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-03-30 16:11:20 +0000 |
commit | 7a26ba4d0dd0f47b3c81181f7cf756fc3a71f8cd (patch) | |
tree | 9da3648163804b7fba100de42e5160634e669805 /clang/lib/CodeGen/CGObjC.cpp | |
parent | 499b40e8a7159b5099a7b7f660782cc466ad13cf (diff) | |
download | bcm5719-llvm-7a26ba4d0dd0f47b3c81181f7cf756fc3a71f8cd.tar.gz bcm5719-llvm-7a26ba4d0dd0f47b3c81181f7cf756fc3a71f8cd.zip |
Fix IRGen issues related to using property-dot syntax
for prperty reference types. // rdar://9208606.
llvm-svn: 128551
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 99b8b57eb96..ac4e763f89f 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -651,16 +651,14 @@ static RValue GenerateMessageSendSuper(CodeGenFunction &CGF, RValue CodeGenFunction::EmitLoadOfPropertyRefLValue(LValue LV, ReturnValueSlot Return) { const ObjCPropertyRefExpr *E = LV.getPropertyRefExpr(); - QualType ResultType; + QualType ResultType = E->getGetterResultType(); Selector S; if (E->isExplicitProperty()) { const ObjCPropertyDecl *Property = E->getExplicitProperty(); S = Property->getGetterName(); - ResultType = E->getType(); } else { const ObjCMethodDecl *Getter = E->getImplicitPropertyGetter(); S = Getter->getSelector(); - ResultType = Getter->getResultType(); // with reference! } llvm::Value *Receiver = LV.getPropertyRefBaseAddr(); @@ -681,14 +679,8 @@ void CodeGenFunction::EmitStoreThroughPropertyRefLValue(RValue Src, LValue Dst) { const ObjCPropertyRefExpr *E = Dst.getPropertyRefExpr(); Selector S = E->getSetterSelector(); - QualType ArgType; - if (E->isImplicitProperty()) { - const ObjCMethodDecl *Setter = E->getImplicitPropertySetter(); - ObjCMethodDecl::param_iterator P = Setter->param_begin(); - ArgType = (*P)->getType(); - } else { - ArgType = E->getType(); - } + QualType ArgType = E->getSetterArgType(); + // FIXME. Other than scalars, AST is not adequate for setter and // getter type mismatches which require conversion. if (Src.isScalar()) { |