[llvm-commits] [llvm-gcc-4.2] r127301 - /llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
Bill Wendling
isanbard at gmail.com
Tue Mar 8 17:00:45 PST 2011
Author: void
Date: Tue Mar 8 19:00:45 2011
New Revision: 127301
URL: http://llvm.org/viewvc/llvm-project?rev=127301&view=rev
Log:
Commit the objc-act.c part from <rdar://problem/6383121>. It fixes a bogus
compiler error: "If ivar in current class isn't fount, it should look in the
parent class."
<rdar://problem/9090823>
Modified:
llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/objc/objc-act.c?rev=127301&r1=127300&r2=127301&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Tue Mar 8 19:00:45 2011
@@ -15414,7 +15414,13 @@
is_ivar (tree decl_chain, tree ident)
{
for ( ; decl_chain; decl_chain = TREE_CHAIN (decl_chain))
- if (DECL_NAME (decl_chain) == ident)
+/* APPLE LOCAL begin radar 6383121 */
+ if (DECL_NAME (decl_chain) == ident
+#ifdef OBJCPLUS
+ && TREE_CODE (decl_chain) != TYPE_DECL
+#endif
+ )
+/* APPLE LOCAL end radar 6383121 */
return decl_chain;
return NULL_TREE;
}
@@ -19673,6 +19679,13 @@
/* Look up the ivar, but do not use it if it is not accessible. */
ivar = is_ivar (objc_ivar_chain, id);
+ /* APPLE LOCAL begin radar 6383121 */
+ if (!ivar && objc_implementation_context) {
+ tree class = lookup_interface (CLASS_NAME (objc_implementation_context));
+ if (class)
+ ivar = nested_ivar_lookup(class, id);
+ }
+ /* APPLE LOCAL end radar 6383121 */
if (!ivar || is_private (ivar))
return other;
More information about the llvm-commits
mailing list