Skip to content

Commit e401fb8

Browse files
[BOLT] Use llvm::replace (NFC) (#140199)
1 parent 3aeced7 commit e401fb8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

bolt/lib/Core/BinaryFunction.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3326,7 +3326,7 @@ void BinaryFunction::duplicateConstantIslands() {
33263326
static std::string constructFilename(std::string Filename,
33273327
std::string Annotation,
33283328
std::string Suffix) {
3329-
std::replace(Filename.begin(), Filename.end(), '/', '-');
3329+
llvm::replace(Filename, '/', '-');
33303330
if (!Annotation.empty())
33313331
Annotation.insert(0, "-");
33323332
if (Filename.size() + Annotation.size() + Suffix.size() > MAX_PATH) {

bolt/lib/Passes/AsmDump.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void dumpFunction(const BinaryFunction &BF) {
109109
}
110110

111111
std::string PrintName = BF.getPrintName();
112-
std::replace(PrintName.begin(), PrintName.end(), '/', '-');
112+
llvm::replace(PrintName, '/', '-');
113113
std::string Filename =
114114
opts::AsmDump.empty()
115115
? (PrintName + ".s")

bolt/lib/Passes/BinaryPasses.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static const char *dynoStatsOptName(const bolt::DynoStats::Category C) {
3535

3636
OptNames[C] = bolt::DynoStats::Description(C);
3737

38-
std::replace(OptNames[C].begin(), OptNames[C].end(), ' ', '-');
38+
llvm::replace(OptNames[C], ' ', '-');
3939

4040
return OptNames[C].c_str();
4141
}

0 commit comments

Comments
 (0)