]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Ojective-C, Darwin : Adjust category superclass ref names (NFC).
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 10 Oct 2020 21:21:05 +0000 (22:21 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 11 Oct 2020 10:33:25 +0000 (11:33 +0100)
Make the order of the class and superclass match the metadata
order from clang.  Makes it easier to compare produced meta-
data between implementations.

gcc/objc/ChangeLog:

* objc-next-runtime-abi-02.c
(next_runtime_abi_02_category_decl): Adjust category
superclass name ordering.

gcc/objc/objc-next-runtime-abi-02.c

index 3a308975325711ec85f1fe11ab4ecbd8d66dd8aa..92ede0325e94404c91e951395859a79be11de3ed 100644 (file)
@@ -980,9 +980,9 @@ next_runtime_abi_02_category_decl (tree klass)
 {
   tree decl;
   char buf[BUFSIZE];
-  snprintf (buf, BUFSIZE, "_OBJC_Category_%s_on_%s",
-           IDENTIFIER_POINTER (CLASS_SUPER_NAME (klass)),
-           IDENTIFIER_POINTER (CLASS_NAME (klass)));
+  snprintf (buf, BUFSIZE, "_OBJC_Category_%s_%s",
+           IDENTIFIER_POINTER (CLASS_NAME (klass)),
+           IDENTIFIER_POINTER (CLASS_SUPER_NAME (klass)));
   decl = start_var_decl (objc_v2_category_template, buf);
   OBJCMETA (decl, objc_meta, meta_category);
   return decl;