aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorAlex Langford <alangford@apple.com>2023-04-26 15:01:12 -0700
committerAlex Langford <alangford@apple.com>2023-04-26 15:56:29 -0700
commit6fcdfc378c2f926ed5a175326fe799844c1c80b2 (patch)
tree08e32cf7940463bd34987ebd6edd23cddddd053d /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent92f1156efc5f762ac3a4cc4eebe62742f6d75789 (diff)
downloadllvm-6fcdfc378c2f926ed5a175326fe799844c1c80b2.zip
llvm-6fcdfc378c2f926ed5a175326fe799844c1c80b2.tar.gz
llvm-6fcdfc378c2f926ed5a175326fe799844c1c80b2.tar.bz2
[lldb] Change return type of FileSpec::GetFileNameExtension
These don't really need to be in ConstStrings. It's nice that comparing ConstStrings is fast (just a pointer comparison) but the cost of creating the ConstString usually already includes the cost of doing a StringRef comparison anyway, so this is just extra work and extra memory consumption for basically no benefit. Differential Revision: https://reviews.llvm.org/D149300
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 6472a93..3af3c87 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -306,7 +306,7 @@ void ScriptInterpreterPython::SharedLibraryDirectoryHelper(
// On windows, we need to manually back out of the python tree, and go into
// the bin directory. This is pretty much the inverse of what ComputePythonDir
// does.
- if (this_file.GetFileNameExtension() == ConstString(".pyd")) {
+ if (this_file.GetFileNameExtension() == ".pyd") {
this_file.RemoveLastPathComponent(); // _lldb.pyd or _lldb_d.pyd
this_file.RemoveLastPathComponent(); // lldb
llvm::StringRef libdir = LLDB_PYTHON_RELATIVE_LIBDIR;