[llvm] [IR] Handle `.__uniq.` in `getGlobalIndentifier` for local linkage objects (PR #98163)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 10:52:16 PDT 2024


================
@@ -1754,7 +1756,8 @@ class ModuleSummaryIndex {
   /// because it is possible in certain clients (not clang at the moment) for
   /// two rounds of ThinLTO optimization and therefore promotion to occur.
   static StringRef getOriginalNameBeforePromote(StringRef Name) {
-    std::pair<StringRef, StringRef> Pair = Name.rsplit(".llvm.");
+    std::pair<StringRef, StringRef> Pair =
+        Name.rsplit(NameParticles::LLVMSuffix);
     return Pair.first;
----------------
ellishg wrote:

```suggestion
  auto [Prefix, Suffix] = Name.rsplit(NameParticles::LLVMSuffix);
  return Prefix;
```

https://github.com/llvm/llvm-project/pull/98163


More information about the llvm-commits mailing list