Author: Jordan Rupprecht Date: 2020-12-16T10:53:18-08:00 New Revision: 869f8363c424592e5f8c258492f46d5fcbc90c83
URL: https://github.com/llvm/llvm-project/commit/869f8363c424592e5f8c258492f46d5fcbc90c83 DIFF: https://github.com/llvm/llvm-project/commit/869f8363c424592e5f8c258492f46d5fcbc90c83.diff LOG: [lldb][NFC] Apply performance-faster-string-find (`str.find("X")` -> `str.find('x')`) Added: Modified: lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp lldb/tools/lldb-vscode/JSONUtils.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp index 72d28c347457..99784bd3dbd1 100644 --- a/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp +++ b/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp @@ -114,7 +114,7 @@ InstrumentationRuntimeMainThreadChecker::RetrieveReportData( std::string className = ""; std::string selector = ""; if (apiName.substr(0, 2) == "-[") { - size_t spacePos = apiName.find(" "); + size_t spacePos = apiName.find(' '); if (spacePos != std::string::npos) { className = apiName.substr(2, spacePos - 2); selector = apiName.substr(spacePos + 1, apiName.length() - spacePos - 2); diff --git a/lldb/tools/lldb-vscode/JSONUtils.cpp b/lldb/tools/lldb-vscode/JSONUtils.cpp index 044bfd13ec46..831f3285d31f 100644 --- a/lldb/tools/lldb-vscode/JSONUtils.cpp +++ b/lldb/tools/lldb-vscode/JSONUtils.cpp @@ -1027,7 +1027,7 @@ CreateRunInTerminalReverseRequest(const llvm::json::Object &launch_request) { std::vector<std::string> envs = GetStrings(launch_request_arguments, "env"); llvm::json::Object environment; for (const std::string &env : envs) { - size_t index = env.find("="); + size_t index = env.find('='); environment.try_emplace(env.substr(0, index), env.substr(index + 1)); } run_in_terminal_args.try_emplace("env", _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits