-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[NFC] Coding style: drop k
in kGlobalIdentifierDelimiter
#98230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-pgo Author: Mircea Trofin (mtrofin) ChangesFull diff: https://github.com/llvm/llvm-project/pull/98230.diff 5 Files Affected:
diff --git a/llvm/include/llvm/IR/GlobalValue.h b/llvm/include/llvm/IR/GlobalValue.h
index 540a21c1118b8..53eddebdd6ae6 100644
--- a/llvm/include/llvm/IR/GlobalValue.h
+++ b/llvm/include/llvm/IR/GlobalValue.h
@@ -43,7 +43,7 @@ typedef unsigned ID;
// Choose ';' as the delimiter. ':' was used once but it doesn't work well for
// Objective-C functions which commonly have :'s in their names.
-inline constexpr char kGlobalIdentifierDelimiter = ';';
+inline constexpr char GlobalIdentifierDelimiter = ';';
class GlobalValue : public Constant {
public:
diff --git a/llvm/lib/IR/Globals.cpp b/llvm/lib/IR/Globals.cpp
index c51852987614c..cc37d7371cce3 100644
--- a/llvm/lib/IR/Globals.cpp
+++ b/llvm/lib/IR/Globals.cpp
@@ -169,7 +169,7 @@ std::string GlobalValue::getGlobalIdentifier(StringRef Name,
else
GlobalName += FileName;
- GlobalName += kGlobalIdentifierDelimiter;
+ GlobalName += GlobalIdentifierDelimiter;
}
GlobalName += Name;
return GlobalName;
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 3c8bf1b962860..93876e87f20b3 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -401,7 +401,7 @@ std::string getPGOName(const GlobalVariable &V, bool InLTO) {
// See getIRPGOObjectName() for a discription of the format.
std::pair<StringRef, StringRef> getParsedIRPGOName(StringRef IRPGOName) {
- auto [FileName, MangledName] = IRPGOName.split(kGlobalIdentifierDelimiter);
+ auto [FileName, MangledName] = IRPGOName.split(GlobalIdentifierDelimiter);
if (MangledName.empty())
return std::make_pair(StringRef(), IRPGOName);
return std::make_pair(FileName, MangledName);
diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp
index e18ce5d373d1c..e7b843362e5b3 100644
--- a/llvm/lib/ProfileData/InstrProfReader.cpp
+++ b/llvm/lib/ProfileData/InstrProfReader.cpp
@@ -1049,7 +1049,7 @@ class llvm::InstrProfReaderItaniumRemapper
// '_Z'; we'll assume that's the mangled name we want.
std::pair<StringRef, StringRef> Parts = {StringRef(), Name};
while (true) {
- Parts = Parts.second.split(kGlobalIdentifierDelimiter);
+ Parts = Parts.second.split(GlobalIdentifierDelimiter);
if (Parts.first.starts_with("_Z"))
return Parts.first;
if (Parts.second.empty())
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index 39cc87cc4cc65..1f6c4c604d57b 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -1123,7 +1123,7 @@ adjustInstrProfile(std::unique_ptr<WriterContext> &WC,
std::string FilePrefixes[] = {".cpp", "cc", ".c", ".hpp", ".h"};
size_t PrefixPos = StringRef::npos;
for (auto &FilePrefix : FilePrefixes) {
- std::string NamePrefix = FilePrefix + kGlobalIdentifierDelimiter;
+ std::string NamePrefix = FilePrefix + GlobalIdentifierDelimiter;
PrefixPos = Name.find_insensitive(NamePrefix);
if (PrefixPos == StringRef::npos)
continue;
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/176/builds/872 Here is the relevant piece of the build log for the reference:
|
No description provided.