[PATCH] D94202: Preserve the lexical order for global variables during llvm-link merge

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 11:38:39 PDT 2021


dexonsmith accepted this revision.
dexonsmith added a comment.

I have a suggestion for the comment inline; with a change there (doesn't need to match my wording) this LGTM.



================
Comment at: llvm/lib/Linker/IRMover.cpp:1490-1492
+  // For each global in the source module, find the corresponding global
+  // in the destination module, append it to the end of the globals list
+  // in the destination module.
----------------
I think it might be more useful to document the goal here, rather than describing how the code accomplishes it. Maybe something like: "Reorder the globals just added to the destination module to match their original order in the source module."


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94202/new/

https://reviews.llvm.org/D94202



More information about the llvm-commits mailing list