[llvm-commits] [llvm] r128507 - /llvm/trunk/lib/Linker/LinkModules.cpp

Bill Wendling isanbard at gmail.com
Tue Mar 29 16:31:06 PDT 2011


Author: void
Date: Tue Mar 29 18:31:06 2011
New Revision: 128507

URL: http://llvm.org/viewvc/llvm-project?rev=128507&view=rev
Log:
Set the unnamed_addr only when we're creating a new GV in the dest module.

Modified:
    llvm/trunk/lib/Linker/LinkModules.cpp

Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=128507&r1=128506&r2=128507&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Tue Mar 29 18:31:06 2011
@@ -505,6 +505,7 @@
                            SGV->getType()->getAddressSpace());
       // Propagate alignment, visibility and section info.
       CopyGVAttributes(NewDGV, SGV);
+      NewDGV->setUnnamedAddr(SGV->hasUnnamedAddr());
 
       // If the LLVM runtime renamed the global, but it is an externally visible
       // symbol, DGV must be an existing global with internal linkage.  Rename





More information about the llvm-commits mailing list