]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/darwin.c
Wrap option names in gcc internal messages with %< and %>.
[thirdparty/gcc.git] / gcc / config / darwin.c
index 8dc2b9db2aa9fd784706078b3203e07002bc6d09..f62f1c79bdd98c303f72a061f0d22067b9977112 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions for generic Darwin as target machine for GNU C compiler.
-   Copyright (C) 1989-2018 Free Software Foundation, Inc.
+   Copyright (C) 1989-2019 Free Software Foundation, Inc.
    Contributed by Apple Computer Inc.
 
 This file is part of GCC.
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "toplev.h"
 #include "lto-section-names.h"
+#include "intl.h"
 
 /* Darwin supports a feature called fix-and-continue, which is used
    for rapid turn around debugging.  When code is compiled with the
@@ -824,8 +825,7 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
 
   /* First handle a simple SYMBOL_REF or LABEL_REF */
   if (GET_CODE (orig) == LABEL_REF
-      || (GET_CODE (orig) == SYMBOL_REF
-         ))
+      || GET_CODE (orig) == SYMBOL_REF)
     {
       /* addr(foo) = &func+(foo-func) */
       orig = machopic_indirect_data_reference (orig, reg);
@@ -1024,10 +1024,6 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
           return pic_ref;
         }
     }
-
-  else if (GET_CODE (orig) == SYMBOL_REF)
-    return orig;
-
   else if (GET_CODE (orig) == PLUS
           && (GET_CODE (XEXP (orig, 0)) == MEM
               || GET_CODE (XEXP (orig, 0)) == SYMBOL_REF
@@ -1057,12 +1053,10 @@ machopic_legitimize_pic_address (rtx orig, machine_mode mode, rtx reg)
        }
       /* Likewise, should we set special REG_NOTEs here?  */
     }
-
   else if (GET_CODE (orig) == CONST)
     {
       return machopic_legitimize_pic_address (XEXP (orig, 0), Pmode, reg);
     }
-
   else if (GET_CODE (orig) == MEM
           && GET_CODE (XEXP (orig, 0)) == SYMBOL_REF)
     {
@@ -1933,6 +1927,7 @@ static GTY (()) vec<darwin_lto_section_e, va_gc> *lto_section_names;
    in darwin_end_file.  */
 static FILE *lto_asm_out_file, *saved_asm_out_file;
 static char *lto_asm_out_name;
+static enum debug_info_levels saved_debug_info_level;
 
 /* Prepare asm_out_file for LTO output.  For darwin, this means hiding
    asm_out_file and switching to an alternative output file.  */
@@ -1941,6 +1936,8 @@ darwin_asm_lto_start (void)
 {
   gcc_assert (! saved_asm_out_file);
   saved_asm_out_file = asm_out_file;
+  saved_debug_info_level = debug_info_level;
+  debug_info_level = DINFO_LEVEL_NONE;
   if (! lto_asm_out_name)
     lto_asm_out_name = make_temp_file (".lto.s");
   lto_asm_out_file = fopen (lto_asm_out_name, "a");
@@ -1959,6 +1956,7 @@ darwin_asm_lto_end (void)
   fclose (lto_asm_out_file);
   asm_out_file = saved_asm_out_file;
   saved_asm_out_file = NULL;
+  debug_info_level = saved_debug_info_level;
 }
 
 static void
@@ -3172,6 +3170,14 @@ darwin_override_options (void)
   if (!global_options_set.x_dwarf_version)
     dwarf_version = 2;
 
+  if (global_options_set.x_dwarf_split_debug_info)
+    {
+      inform (input_location,
+             "%<-gsplit-dwarf%> is not supported on this platform, ignored");
+      dwarf_split_debug_info = 0;
+      global_options_set.x_dwarf_split_debug_info = 0;
+    }
+
   /* Do not allow unwind tables to be generated by default for m32.  
      fnon-call-exceptions will override this, regardless of what we do.  */
   if (generating_for_darwin_version < 10
@@ -3197,8 +3203,8 @@ darwin_override_options (void)
               && !global_options_set.x_flag_asynchronous_unwind_tables)))
     {
       inform (input_location,
-             "-freorder-blocks-and-partition does not work with exceptions "
-             "on this architecture");
+             "%<-freorder-blocks-and-partition%> does not work with "
+             "exceptions on this architecture");
       flag_reorder_blocks_and_partition = 0;
       flag_reorder_blocks = 1;
     }
@@ -3560,8 +3566,9 @@ darwin_build_constant_cfstring (tree str)
          for (l = 0; l < length; l++)
            if (!s[l] || !isascii (s[l]))
              {
-               warning (darwin_warn_nonportable_cfstrings, "%s in CFString literal",
-                        s[l] ? "non-ASCII character" : "embedded NUL");
+               warning (darwin_warn_nonportable_cfstrings,
+                        s[l] ? G_("non-ASCII character in CFString literal")
+                             : G_("embedded NUL in CFString literal"));
                break;
              }
        }
@@ -3707,19 +3714,4 @@ default_function_sections:
                    : text_section;
 }
 
-/* When a function is partitioned between sections, we need to insert a label
-   at the start of each new chunk - so that it may become a valid 'atom' for
-   eh and debug purposes.  Without this the linker will emit warnings if one 
-   tries to add line location information (since the switched fragment will 
-   be anonymous).  */
-
-void
-darwin_function_switched_text_sections (FILE *fp, tree decl, bool new_is_cold)
-{
-  /* Make sure we pick up all the relevant quotes etc.  */
-  assemble_name_raw (fp, new_is_cold ? "__cold_sect_of_" : "__hot_sect_of_");
-  assemble_name_raw (fp, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
-  fputs (":\n", fp);
-}
-
 #include "gt-darwin.h"