[PATCH] D15084: Split the linker in 2

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 20:03:28 PST 2015


tejohnson accepted this revision.
tejohnson added a reviewer: tejohnson.
tejohnson added a comment.
This revision is now accepted and ready to land.

LGTM with a couple nits and another renaming suggestion. Thanks for doing this, it looks much cleaner than the current approach.


================
Comment at: lib/Linker/IRMover.cpp:363
@@ +362,3 @@
+
+/// This is an implementation class for the LinkModules function, which is the
+/// entrypoint for this file.
----------------
This comment is incorrect for this version of class ModuleLinker.

================
Comment at: lib/Linker/IRMover.cpp:365
@@ +364,3 @@
+/// entrypoint for this file.
+class ModuleLinker {
+  Module &DstM;
----------------
It seems like a different class name might be better for this split part. Maybe IRLinker?

================
Comment at: lib/Linker/LinkModules.cpp:70
@@ -440,4 +69,3 @@
   bool emitError(const Twine &Message) {
-    DiagnosticHandler(LinkDiagnosticInfo(DS_Error, Message));
-    HasError = true;
+    Mover.getDiagnosticHandler()(LinkDiagnosticInfo(DS_Error, Message));
     return true;
----------------
Comment needs to be updated.


http://reviews.llvm.org/D15084





More information about the llvm-commits mailing list