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/ObjectFile/ELF/ObjectFileELF.cpp | |
parent | 92f1156efc5f762ac3a4cc4eebe62742f6d75789 (diff) | |
download | llvm-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/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index 0c39a4f..2443d83 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -2029,7 +2029,7 @@ unsigned ObjectFileELF::ParseSymbols(Symtab *symtab, user_id_t start_id, // contain the note section specifying the environment to Android but the // custom extension and file name makes it highly unlikely that this will // collide with anything else. - ConstString file_extension = m_file.GetFileNameExtension(); + llvm::StringRef file_extension = m_file.GetFileNameExtension(); bool skip_oatdata_oatexec = file_extension == ".oat" || file_extension == ".odex"; |