((id)cat)->isa. Fixes radar
7709015.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97672
91177308-0d34-0410-b5e6-
96231b3b80d8
V = CreateTempAlloca(ClassPtrTy, "resval");
llvm::Value *Src = EmitScalarExpr(BaseExpr);
Builder.CreateStore(Src, V);
+ LValue LV = LValue::MakeAddr(V, MakeQualifiers(E->getType()));
+ V = ScalarExprEmitter(*this).EmitLoadOfLValue(LV, E->getType());
}
else {
if (E->isArrow())
-// RUN: %clang_cc1 -emit-llvm -o %t %s
+// RUN: %clang_cc1 -emit-llvm -o - %s
typedef struct objc_class *Class;
return (*[Foo method]).isa;
return [Foo method]->isa;
}
+
+// rdar 7709015
+@interface Cat {}
+@end
+
+@interface SuperCat : Cat {}
++(void)geneticallyAlterCat:(Cat *)cat;
+@end
+
+@implementation SuperCat
++ (void)geneticallyAlterCat:(Cat *)cat {
+ Class dynamicSubclass;
+ ((id)cat)->isa = dynamicSubclass;
+}
+@end
+