From 0a04d77bde7e3a661c2b41b60630d125d09ed6ef Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 23 Aug 2008 10:51:21 +0000 Subject: Implement Obj-C ivar references to aggregates. Implement Obj-C lvalue message sends (aggregate returns). Update several places to emit more precise ErrorUnsupported warnings for currently unimplemented Obj-C features (main missing chunks are property references, Obj-C exception handling, and the for ... in syntax). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55234 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index ddf1421b98..3f7b737752 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -134,6 +134,13 @@ public: Value *VisitObjCSelectorExpr(ObjCSelectorExpr *E); Value *VisitObjCProtocolExpr(ObjCProtocolExpr *E); Value *VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) { return EmitLoadOfLValue(E);} + Value *VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) { + CGF.ErrorUnsupported(E, "scalar expression (Objective-C property reference)"); + if (E->getType()->isVoidType()) + return 0; + return llvm::UndefValue::get(CGF.ConvertType(E->getType())); + } + Value *VisitArraySubscriptExpr(ArraySubscriptExpr *E); Value *VisitShuffleVectorExpr(ShuffleVectorExpr *E); Value *VisitMemberExpr(Expr *E) { return EmitLoadOfLValue(E); } -- cgit v1.2.3