to access a field of its type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62123
91177308-0d34-0410-b5e6-
96231b3b80d8
isUnion = true;
CVRQualifiers = PTy->getPointeeType().getCVRQualifiers();
}
+ else if (BaseExpr->getStmtClass() == Expr::ObjCPropertyRefExprClass ||
+ BaseExpr->getStmtClass() == Expr::ObjCKVCRefExprClass) {
+ RValue RV = EmitObjCPropertyGet(BaseExpr);
+ BaseValue = RV.getAggregateAddr();
+ if (BaseExpr->getType()->isUnionType())
+ isUnion = true;
+ CVRQualifiers = BaseExpr->getType().getCVRQualifiers();
+ }
else {
LValue BaseLV = EmitLValue(BaseExpr);
if (BaseLV.isObjCIvar())
--- /dev/null
+// RUN: clang -emit-llvm -o %t %s
+
+typedef struct {
+ unsigned f0;
+} s0;
+
+@interface A
+- (s0) f0;
+@end
+
+@implementation A
+-(s0) f0{}
+- (unsigned) bar {
+ return self.f0.f0;
+}
+@end
+