[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:17 PDT 2024
================
@@ -159,11 +159,12 @@ std::string GlobalValue::getGlobalIdentifier(StringRef Name,
Name.consume_front("\1");
std::string GlobalName;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
+ if (llvm::GlobalValue::isLocalLinkage(Linkage) &&
+ Name.find(NameParticles::UniqSuffix) == StringRef::npos) {
----------------
ellishg wrote:
Why not use `Name.contains(NameParticles::UniqSuffix)`?
https://github.com/llvm/llvm-project/pull/98163
More information about the llvm-commits
mailing list