[llvm-branch-commits] [llvm-gcc-tag] r110862 - in /llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4: ./ gcc/llvm-backend.cpp gcc/tree.h gcc/varasm.c

Bill Wendling isanbard at gmail.com
Wed Aug 11 15:31:41 PDT 2010


Author: void
Date: Wed Aug 11 17:31:41 2010
New Revision: 110862

URL: http://llvm.org/viewvc/llvm-project?rev=110862&view=rev
Log:
Copy llvmgcc42-2333.3 + r107439. (Re-added after reverting.)

Added:
    llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/   (props changed)
      - copied from r110861, llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.3/
Modified:
    llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/llvm-backend.cpp
    llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/tree.h
    llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/varasm.c

Propchange: llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Aug 11 17:31:41 2010
@@ -0,0 +1,2 @@
+/llvm/trunk:100565
+/llvm-gcc-4.2/trunk:98728,98841,98893,99196,99305,99592-99593,99629,99670,99982,99984-99986,99988,99992-99993,99995,99997-99999,100035,100149,100303,100565,100624-100626,100712,100721,101090-101091,101199,101216,101304,101333,101804,101959,102139,102148,102433,102444,102506-102507,102511,102532,102561,102589,102636,102648,102745,103361,103366-103367,103394,103414,103644,103800,103918,104181,104384,104420,104423,104523,104726,105504,105828-105829,105902,105948-105949,106005,106243-106244,106270,106352,106564,106611-106612,106681,106690,106711,107062,107439,107843,108784-108786,109556-109557,110272,110501

Modified: llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/llvm-backend.cpp?rev=110862&r1=110861&r2=110862&view=diff
==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/llvm-backend.cpp Wed Aug 11 17:31:41 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/tags/Apple/llvmgcc42-2333.4/gcc/tree.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/tree.h?rev=110862&r1=110861&r2=110862&view=diff
==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/tree.h (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/tree.h Wed Aug 11 17:31:41 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/tags/Apple/llvmgcc42-2333.4/gcc/varasm.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/varasm.c?rev=110862&r1=110861&r2=110862&view=diff
==============================================================================
--- llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/varasm.c (original)
+++ llvm-gcc-4.2/tags/Apple/llvmgcc42-2333.4/gcc/varasm.c Wed Aug 11 17:31:41 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