diff options
| author | Alex Langford <alangford@apple.com> | 2023-04-26 15:01:12 -0700 |
|---|---|---|
| committer | Alex Langford <alangford@apple.com> | 2023-04-26 15:56:29 -0700 |
| commit | 6fcdfc378c2f926ed5a175326fe799844c1c80b2 (patch) | |
| tree | 08e32cf7940463bd34987ebd6edd23cddddd053d /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | 92f1156efc5f762ac3a4cc4eebe62742f6d75789 (diff) | |
[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.cpp | 2 |
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 6472a9301ed6..3af3c87dab33 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; |
