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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 16:05:19 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/lib/Linker/IRMover.cpp:1522
+      if (NewGV)
+        Globals.splice(Globals.end(), Globals, NewGV->getIterator());
+    }
----------------
See `test/tools/gold/X86/weak.ll` for a case (merging `a b` and `a c`, `a` is weak) where the splice usage regressed the order.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94202



More information about the llvm-commits mailing list