diff options
author | Fangrui Song <i@maskray.me> | 2020-12-16 23:28:32 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2020-12-16 23:28:32 -0800 |
commit | c70f36865e040840f4c4a82108f5e356d92a2923 (patch) | |
tree | efbc117450c3363d3809939811a0615fedebd132 /llvm/tools/gold | |
parent | a906e3eccd1ed149ffc8bdf2540c7cff4171e3bd (diff) | |
download | llvm-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.cpp | 4 |
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); |