[llvm-commits] [llvm-gcc-4.2] r46842 - in /llvm-gcc-4.2/trunk/gcc: config/darwin.c config/rs6000/rs6000.c varasm.c

Bill Wendling isanbard at gmail.com
Wed Feb 6 21:45:14 PST 2008


Author: void
Date: Wed Feb  6 23:45:10 2008
New Revision: 46842

URL: http://llvm.org/viewvc/llvm-project?rev=46842&view=rev
Log:
Clean up the patch about visibility. Only block out the parts LLVM
doesn't want to do instead of creating new functions and making life
miserable for everyone on the planet.

Modified:
    llvm-gcc-4.2/trunk/gcc/config/darwin.c
    llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.c
    llvm-gcc-4.2/trunk/gcc/varasm.c

Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.c?rev=46842&r1=46841&r2=46842&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.c Wed Feb  6 23:45:10 2008
@@ -1988,19 +1988,6 @@
    extern".  There is no MACH-O equivalent of ELF's
    VISIBILITY_INTERNAL or VISIBILITY_PROTECTED. */
 
-/* LLVM LOCAL begin */
-#ifdef ENABLE_LLVM
-void
-darwin_assemble_visibility (tree decl ATTRIBUTE_UNUSED, int vis)
-{
-  /* Emit a warning if the visibility isn't supported with this
-     configuration. We don't want to output anything to the ASM file, of
-     course.  */
-  if (!(vis == VISIBILITY_DEFAULT || vis == VISIBILITY_HIDDEN))
-    warning (OPT_Wattributes, "internal and protected visibility attributes "
-	     "not supported in this configuration; ignored");
-}
-#else
 void
 darwin_assemble_visibility (tree decl, int vis)
 {
@@ -2008,17 +1995,19 @@
     ;
   else if (vis == VISIBILITY_HIDDEN)
     {
+/* LLVM LOCAL */
+#ifndef ENABLE_LLVM
       fputs ("\t.private_extern ", asm_out_file);
       assemble_name (asm_out_file,
 		     (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))));
       fputs ("\n", asm_out_file);
+/* LLVM LOCAL */
+#endif
     }
   else
     warning (OPT_Wattributes, "internal and protected visibility attributes "
 	     "not supported in this configuration; ignored");
 }
-#endif
-/* LLVM LOCAL end */
 
 /* Output a difference of two labels that will be an assembly time
    constant if the two labels are local.  (.long lab1-lab2 will be

Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.c?rev=46842&r1=46841&r2=46842&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/rs6000/rs6000.c Wed Feb  6 23:45:10 2008
@@ -944,14 +944,10 @@
 #undef TARGET_ASM_INTEGER
 #define TARGET_ASM_INTEGER rs6000_assemble_integer
 
-/* LLVM LOCAL - Use default assemble_visibility */
-#ifndef ENABLE_LLVM
 #ifdef HAVE_GAS_HIDDEN
 #undef TARGET_ASM_ASSEMBLE_VISIBILITY
 #define TARGET_ASM_ASSEMBLE_VISIBILITY rs6000_assemble_visibility
 #endif
-/* LLVM LOCAL - Use default assemble_visibility */
-#endif
 
 #undef TARGET_HAVE_TLS
 #define TARGET_HAVE_TLS HAVE_AS_TLS
@@ -13108,6 +13104,8 @@
       && DOT_SYMBOLS
       && TREE_CODE (decl) == FUNCTION_DECL)
     {
+/* LLVM LOCAL */
+#ifndef ENABLE_LLVM
       static const char * const visibility_types[] = {
 	NULL, "internal", "hidden", "protected"
       };
@@ -13120,6 +13118,8 @@
 
       fprintf (asm_out_file, "\t.%s\t%s\n", type, name);
       fprintf (asm_out_file, "\t.%s\t.%s\n", type, name);
+/* LLVM LOCAL */
+#endif
     }
   else
     default_assemble_visibility (decl, vis);

Modified: llvm-gcc-4.2/trunk/gcc/varasm.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/varasm.c?rev=46842&r1=46841&r2=46842&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/varasm.c (original)
+++ llvm-gcc-4.2/trunk/gcc/varasm.c Wed Feb  6 23:45:10 2008
@@ -5317,11 +5317,12 @@
 
 
 #ifdef HAVE_GAS_HIDDEN
+/* LLVM LOCAL */
 #ifndef ENABLE_LLVM
   fprintf (asm_out_file, "\t.%s\t", type);
   assemble_name (asm_out_file, name);
   fprintf (asm_out_file, "\n");
-  /* LLVM LOCAL */
+/* LLVM LOCAL */
 #endif
 #else
   warning (OPT_Wattributes, "visibility attribute not supported "





More information about the llvm-commits mailing list