[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
================
@@ -1743,8 +1743,10 @@ class ModuleSummaryIndex {
}
static std::string getGlobalNameForLocal(StringRef Name, StringRef Suffix) {
+ if (Name.contains(NameParticles::UniqSuffix))
+ return std::string(Name);
SmallString<256> NewName(Name);
- NewName += ".llvm.";
+ NewName += NameParticles::LLVMSuffix;
NewName += Suffix;
return std::string(NewName);
----------------
ellishg wrote:
I'm not positive, but I wonder if `Twine` is faster.
```
return (Twine(Name) + NameParticles::LLVMSuffix + Suffix).str();
```
https://github.com/llvm/llvm-project/pull/98163
More information about the llvm-commits
mailing list