[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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user