objc-runtime-shared-support.c (build_module_descriptor): Set TREE_USED on UOBJC_MODUL...
authorAldy Hernandez <aldyh@redhat.com>
Mon, 8 Jun 2015 10:15:34 +0000 (10:15 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Mon, 8 Jun 2015 10:15:34 +0000 (10:15 +0000)
* objc-runtime-shared-support.c (build_module_descriptor): Set
TREE_USED on UOBJC_MODULES_decl.

From-SVN: r224213

gcc/objc/ChangeLog
gcc/objc/objc-runtime-shared-support.c

index 03327a52703767f569c0b859a76cfb1078e06e43..46c3cfdb9392b36ff59b9210f0f800c329eeb85a 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-08  Aldy Hernandez  <aldyh@redhat.com>
+
+       * objc-runtime-shared-support.c (build_module_descriptor): Set
+       TREE_USED on UOBJC_MODULES_decl.
+
 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
 
        * objc-act.c (objc_write_global_declarations): Adjust comment.
index d9b3c27af47f61e855c0bb3ed43b857ca11f6909..1bcb14a298111e9501f1e0434877d3e6905785cd 100644 (file)
@@ -519,6 +519,9 @@ build_module_descriptor (long vers, tree attr)
      is referenced by the runtime and, therefore, needed.  */
   DECL_PRESERVE_P (UOBJC_MODULES_decl) = 1;
 
+  /* Squash `defined but not used' warning.  */
+  TREE_USED (UOBJC_MODULES_decl) = 1;
+
   /* Allow the runtime to mark meta-data such that it can be assigned to target
      specific sections by the back-end.  */
   if (attr)