aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/gold
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-12-16 23:28:32 -0800
committerFangrui Song <i@maskray.me>2020-12-16 23:28:32 -0800
commitc70f36865e040840f4c4a82108f5e356d92a2923 (patch)
treeefbc117450c3363d3809939811a0615fedebd132 /llvm/tools/gold
parenta906e3eccd1ed149ffc8bdf2540c7cff4171e3bd (diff)
downloadllvm-c70f36865e040840f4c4a82108f5e356d92a2923.zip
llvm-c70f36865e040840f4c4a82108f5e356d92a2923.tar.gz
llvm-c70f36865e040840f4c4a82108f5e356d92a2923.tar.bz2
Use basic_string::find(char) instead of basic_string::find(const char *s, size_type pos=0)
Many (StringRef) cannot be detected by clang-tidy performance-faster-string-find.
Diffstat (limited to 'llvm/tools/gold')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index b218279..94a26bb 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -691,7 +691,7 @@ static const void *getSymbolsAndView(claimed_file &F) {
static void getThinLTOOldAndNewSuffix(std::string &OldSuffix,
std::string &NewSuffix) {
assert(options::thinlto_object_suffix_replace.empty() ||
- options::thinlto_object_suffix_replace.find(";") != StringRef::npos);
+ options::thinlto_object_suffix_replace.find(';') != StringRef::npos);
StringRef SuffixReplace = options::thinlto_object_suffix_replace;
auto Split = SuffixReplace.split(';');
OldSuffix = std::string(Split.first);
@@ -847,7 +847,7 @@ static CodeGenOpt::Level getCGOptLevel() {
static void getThinLTOOldAndNewPrefix(std::string &OldPrefix,
std::string &NewPrefix) {
StringRef PrefixReplace = options::thinlto_prefix_replace;
- assert(PrefixReplace.empty() || PrefixReplace.find(";") != StringRef::npos);
+ assert(PrefixReplace.empty() || PrefixReplace.find(';') != StringRef::npos);
auto Split = PrefixReplace.split(';');
OldPrefix = std::string(Split.first);
NewPrefix = std::string(Split.second);