diff options
author | Mircea Trofin <mtrofin@google.com> | 2024-07-09 15:44:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 15:44:55 -0700 |
commit | afbd7d1e7c7155b07561e46275a451fec917c34c (patch) | |
tree | bbc38f98757abeeae2dfe7119557f88148133dd9 | |
parent | 7021e44b2f0e11717c0d82456bad0fed4a0b48f9 (diff) | |
download | llvm-afbd7d1e7c7155b07561e46275a451fec917c34c.zip llvm-afbd7d1e7c7155b07561e46275a451fec917c34c.tar.gz llvm-afbd7d1e7c7155b07561e46275a451fec917c34c.tar.bz2 |
[NFC] Coding style: drop `k` in `kGlobalIdentifierDelimiter` (#98230)
-rw-r--r-- | llvm/include/llvm/IR/GlobalValue.h | 2 | ||||
-rw-r--r-- | llvm/lib/IR/Globals.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/ProfileData/InstrProf.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/ProfileData/InstrProfReader.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-profdata/llvm-profdata.cpp | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/IR/GlobalValue.h b/llvm/include/llvm/IR/GlobalValue.h index 540a21c..53eddeb 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 c518529..cc37d73 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 3c8bf1b..93876e8 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 e18ce5d3..e7b8433 100644 --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -1049,7 +1049,7 @@ public: // '_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 39cc87c..1f6c4c6 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; |