Skip to content

Commit afbd7d1

Browse files
authored
[NFC] Coding style: drop k in kGlobalIdentifierDelimiter (#98230)
1 parent 7021e44 commit afbd7d1

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

llvm/include/llvm/IR/GlobalValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typedef unsigned ID;
4343

4444
// Choose ';' as the delimiter. ':' was used once but it doesn't work well for
4545
// Objective-C functions which commonly have :'s in their names.
46-
inline constexpr char kGlobalIdentifierDelimiter = ';';
46+
inline constexpr char GlobalIdentifierDelimiter = ';';
4747

4848
class GlobalValue : public Constant {
4949
public:

llvm/lib/IR/Globals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ std::string GlobalValue::getGlobalIdentifier(StringRef Name,
169169
else
170170
GlobalName += FileName;
171171

172-
GlobalName += kGlobalIdentifierDelimiter;
172+
GlobalName += GlobalIdentifierDelimiter;
173173
}
174174
GlobalName += Name;
175175
return GlobalName;

llvm/lib/ProfileData/InstrProf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ std::string getPGOName(const GlobalVariable &V, bool InLTO) {
401401

402402
// See getIRPGOObjectName() for a discription of the format.
403403
std::pair<StringRef, StringRef> getParsedIRPGOName(StringRef IRPGOName) {
404-
auto [FileName, MangledName] = IRPGOName.split(kGlobalIdentifierDelimiter);
404+
auto [FileName, MangledName] = IRPGOName.split(GlobalIdentifierDelimiter);
405405
if (MangledName.empty())
406406
return std::make_pair(StringRef(), IRPGOName);
407407
return std::make_pair(FileName, MangledName);

llvm/lib/ProfileData/InstrProfReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ class llvm::InstrProfReaderItaniumRemapper
10491049
// '_Z'; we'll assume that's the mangled name we want.
10501050
std::pair<StringRef, StringRef> Parts = {StringRef(), Name};
10511051
while (true) {
1052-
Parts = Parts.second.split(kGlobalIdentifierDelimiter);
1052+
Parts = Parts.second.split(GlobalIdentifierDelimiter);
10531053
if (Parts.first.starts_with("_Z"))
10541054
return Parts.first;
10551055
if (Parts.second.empty())

llvm/tools/llvm-profdata/llvm-profdata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ adjustInstrProfile(std::unique_ptr<WriterContext> &WC,
11231123
std::string FilePrefixes[] = {".cpp", "cc", ".c", ".hpp", ".h"};
11241124
size_t PrefixPos = StringRef::npos;
11251125
for (auto &FilePrefix : FilePrefixes) {
1126-
std::string NamePrefix = FilePrefix + kGlobalIdentifierDelimiter;
1126+
std::string NamePrefix = FilePrefix + GlobalIdentifierDelimiter;
11271127
PrefixPos = Name.find_insensitive(NamePrefix);
11281128
if (PrefixPos == StringRef::npos)
11291129
continue;

0 commit comments

Comments
 (0)