summaryrefslogtreecommitdiff
path: root/libobjc/class.c
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-09 10:29:50 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-09 10:29:50 +0000
commit7859870cdfc8c5083993fb078e8007bda45270f1 (patch)
tree52323cadfeff71297cb073de42a81990ba9f9e54 /libobjc/class.c
parent11d79063da416f34d6371a5f957ea6a13732bc05 (diff)
downloadgcc-7859870cdfc8c5083993fb078e8007bda45270f1.tar.gz
In libobjc/:
2011-10-09 Nicola Pero <nicola.pero@meta-innovation.com> PR libobjc/49883 * init.c (__objc_exec_class): Work around a bug in clang's code generation. Clang sets the class->info field to values different from 0x1 or 0x2 (the only allowed values in the traditional GNU Objective-C runtime ABI) to store some additional information, but this breaks backwards compatibility. Wipe out all the bits in the fields other than the first two upon loading a class. 2011-10-09 Nicola Pero <nicola.pero@meta-innovation.com> * class.c (objc_lookup_class): Added back for compatibility with clang which seems to emit calls to it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179721 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/class.c')
-rw-r--r--libobjc/class.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libobjc/class.c b/libobjc/class.c
index edc56aa9ec4..3b750829f3b 100644
--- a/libobjc/class.c
+++ b/libobjc/class.c
@@ -764,6 +764,15 @@ objc_get_meta_class (const char *name)
return objc_get_class (name)->class_pointer;
}
+/* This is not used by GCC, but the clang compiler seems to use it
+ when targetting the GNU runtime. That's wrong, but we have it to
+ be compatible. */
+Class
+objc_lookup_class (const char *name)
+{
+ return objc_getClass (name);
+}
+
/* This is used when the implementation of a method changes. It goes
through all classes, looking for the ones that have these methods
(either method_a or method_b; method_b can be NULL), and reloads