[llvm-branch-commits] [llvm-gcc-branch] r107442 - in /llvm-gcc-4.2/branches/Apple/Morbo/gcc: llvm-backend.cpp tree.h varasm.c

Bill Wendling isanbard at gmail.com
Thu Jul 1 15:43:12 PDT 2010


Author: void
Date: Thu Jul  1 17:43:12 2010
New Revision: 107442

URL: http://llvm.org/viewvc/llvm-project?rev=107442&view=rev
Log:
$ svn merge -c 107439 https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk
--- Merging r107439 into '.':
U    gcc/tree.h
U    gcc/llvm-backend.cpp
U    gcc/varasm.c

Modified:
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/llvm-backend.cpp
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/tree.h
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/varasm.c

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/llvm-backend.cpp?rev=107442&r1=107441&r2=107442&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/llvm-backend.cpp Thu Jul  1 17:43:12 2010
@@ -1154,6 +1154,8 @@
     Linkage = GlobalValue::PrivateLinkage;
   else if (DECL_LLVM_LINKER_PRIVATE(decl))
     Linkage = GlobalValue::LinkerPrivateLinkage;
+  else if (DECL_LLVM_LINKER_PRIVATE_WEAK(decl))
+    Linkage = GlobalValue::LinkerPrivateWeakLinkage;
   else if (DECL_WEAK(decl))
     // The user may have explicitly asked for weak linkage - ignore flag_odr.
     Linkage = GlobalValue::WeakAnyLinkage;
@@ -1420,6 +1422,9 @@
   } else if (CODE_CONTAINS_STRUCT (TREE_CODE (decl), TS_DECL_WITH_VIS)
              && DECL_LLVM_LINKER_PRIVATE(decl)) {
     Linkage = GlobalValue::LinkerPrivateLinkage;
+  } else if (CODE_CONTAINS_STRUCT (TREE_CODE (decl), TS_DECL_WITH_VIS)
+             && DECL_LLVM_LINKER_PRIVATE_WEAK(decl)) {
+    Linkage = GlobalValue::LinkerPrivateWeakLinkage;
   } else if (!TREE_PUBLIC(decl)) {
     Linkage = GlobalValue::InternalLinkage;
   } else if (DECL_WEAK(decl)) {
@@ -1488,7 +1493,8 @@
 
     // Handle used decls
     if (DECL_PRESERVE_P (decl)) {
-      if (DECL_LLVM_LINKER_PRIVATE (decl))
+      if (DECL_LLVM_LINKER_PRIVATE (decl) ||
+          DECL_LLVM_LINKER_PRIVATE_WEAK (decl))
         AttributeCompilerUsedGlobals.insert(GV);
       else
         AttributeUsedGlobals.insert(GV);

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/tree.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/tree.h?rev=107442&r1=107441&r2=107442&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/tree.h (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/tree.h Thu Jul  1 17:43:12 2010
@@ -2937,6 +2937,9 @@
   (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.llvm_private_flag)
 #define DECL_LLVM_LINKER_PRIVATE(NODE) \
   (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.llvm_linker_private_flag)
+/* LLVM LOCAL - linker_private_weak <rdar://problem/7907014> */
+#define DECL_LLVM_LINKER_PRIVATE_WEAK(NODE) \
+  (DECL_WITH_VIS_CHECK (NODE)->decl_with_vis.llvm_linker_private_weak_flag)
 #endif
 /* LLVM LOCAL end */
 
@@ -3080,6 +3083,8 @@
  /* LLVM LOCAL begin */
  unsigned llvm_private_flag : 1;
  unsigned llvm_linker_private_flag : 1;
+ /* LLVM LOCAL - linker_private_weak <rdar://problem/7907014> */
+ unsigned llvm_linker_private_weak_flag : 1;
  /* LLVM LOCAL end */
 
  ENUM_BITFIELD(symbol_visibility) visibility : 2;

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/varasm.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/varasm.c?rev=107442&r1=107441&r2=107442&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/varasm.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/varasm.c Thu Jul  1 17:43:12 2010
@@ -787,7 +787,8 @@
 
       if (has_objc_prefix) {
         DECL_LLVM_PRIVATE (decl) = (name[0] == 'L');
-        DECL_LLVM_LINKER_PRIVATE (decl) = (name[0] == 'l');
+        DECL_LLVM_LINKER_PRIVATE (decl) = (name[0] == 'l' && !DECL_WEAK (decl));
+        DECL_LLVM_LINKER_PRIVATE_WEAK(decl)=(name[0] == 'l' && DECL_WEAK(decl));
 
         /* Remove the "[Ll]_" prefix. The LLVM assembly printer is now
            intelligent enough to add the appropriate prefix to the name.  */





More information about the llvm-branch-commits mailing list