summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-03-28 18:10:14 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-03-28 18:10:14 +0000
commitc712bac78b20f39bb91744e24090c199876f3958 (patch)
treeb274e00464f79bc05785fa995e0af9a7bf33a07c /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
parent2715b2871653e8b34183d0600fd31cd9d451a0c3 (diff)
downloadbcm5719-llvm-c712bac78b20f39bb91744e24090c199876f3958.tar.gz
bcm5719-llvm-c712bac78b20f39bb91744e24090c199876f3958.zip
[NFC] find_first_of/find_last_of -> find/rfind for single char.
For a single char argument, find_first_of is equal to find and find_last_of is equal to rfind. While playing around with the plugin stuff this caused an export failure because it always got inlined except once, which resulted in an undefined symbol. llvm-svn: 357198
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 759fbd01ce1..f11192b7c80 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -109,7 +109,7 @@ PythonString PythonObject::Str() const {
PythonObject
PythonObject::ResolveNameWithDictionary(llvm::StringRef name,
const PythonDictionary &dict) {
- size_t dot_pos = name.find_first_of('.');
+ size_t dot_pos = name.find('.');
llvm::StringRef piece = name.substr(0, dot_pos);
PythonObject result = dict.GetItemForKey(PythonString(piece));
if (dot_pos == llvm::StringRef::npos) {
@@ -133,7 +133,7 @@ PythonObject PythonObject::ResolveName(llvm::StringRef name) const {
// refers to the `sys` module, and `name` == "path.append", then it will find
// the function `sys.path.append`.
- size_t dot_pos = name.find_first_of('.');
+ size_t dot_pos = name.find('.');
if (dot_pos == llvm::StringRef::npos) {
// No dots in the name, we should be able to find the value immediately as
// an attribute of `m_py_obj`.
OpenPOWER on IntegriCloud