[PATCH] D15084: Split the linker in 2

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 18:28:05 PST 2015


tejohnson added inline comments.

================
Comment at: lib/Linker/LinkModules.cpp:127
@@ -519,1 +126,3 @@
 
+  void doThinLTOPromotion();
+
----------------
doxygen comments for here and below

================
Comment at: lib/Linker/LinkModules.cpp:313
@@ -707,3 +312,3 @@
     // If imported as a declaration, it becomes external_weak.
-    return GlobalValue::ExternalWeakLinkage;
+    return GlobalValue::WeakAnyLinkage;
 
----------------
Why this change? I thought for a declaration it should be external_weak? If it needs to be changed the comment is stale.  

================
Comment at: lib/Linker/LinkModules.cpp:697
@@ -1805,1 +696,3 @@
   }
+  GV.setName(getName(&GV));
+  GV.setLinkage(getLinkage(&GV));
----------------
We should only need to promote and make these changes if we are inside the above if statement (i.e. promoting a local to global). So I think the setName, setLinkage and setVisibility can be moved within the if local linkage & promote body.


http://reviews.llvm.org/D15084





More information about the llvm-commits mailing list