[lld] [lld][macho] Strip .__uniq. and .llvm. hashes in -order_file (PR #140670)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue May 20 21:19:37 PDT 2025
================
@@ -245,12 +245,18 @@ DenseMap<const InputSection *, int> CallGraphSort::run() {
return orderMap;
}
+StringRef macho::PriorityBuilder::getRootSymbol(StringRef Name) {
+ auto [P0, S0] = Name.rsplit(".llvm.");
+ auto [P1, S1] = P0.rsplit(".__uniq.");
+ return P1;
+}
+
----------------
MaskRay wrote:
lld/Common/LLVM.h is for forward declarations. Perhaps a new header in lld/Common?
https://github.com/llvm/llvm-project/pull/140670
More information about the llvm-commits
mailing list