aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
diff options
context:
space:
mode:
authorAlex Langford <alangford@apple.com>2023-05-02 10:05:36 -0700
committerAlex Langford <alangford@apple.com>2023-05-02 17:21:33 -0700
commitc4f3f5225df73cf83042b5e3615549aae0be2422 (patch)
tree80b1d58ade7093c2ed8c799702e555a2646bedab /lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
parent50e79d725c105344e292d1fe8044a69467c20346 (diff)
downloadllvm-c4f3f5225df73cf83042b5e3615549aae0be2422.zip
llvm-c4f3f5225df73cf83042b5e3615549aae0be2422.tar.gz
llvm-c4f3f5225df73cf83042b5e3615549aae0be2422.tar.bz2
[lldb] Remove FileSpec::GetLastPathComponent
As far as I can tell, this just computes the filename of the FileSpec, which is already conveniently stored in m_filename. We can use FileSpec::GetFilename() instead. Differential Revision: https://reviews.llvm.org/D149663
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 4f1ce5c..97f40ae 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -166,7 +166,7 @@ static UUID GetCoffUUID(llvm::object::COFFObjectFile &coff_obj) {
auto raw_data = coff_obj.getData();
LLDB_SCOPED_TIMERF(
"Calculating module crc32 %s with size %" PRIu64 " KiB",
- FileSpec(coff_obj.getFileName()).GetLastPathComponent().AsCString(),
+ FileSpec(coff_obj.getFileName()).GetFilename().AsCString(),
static_cast<lldb::offset_t>(raw_data.size()) / 1024);
gnu_debuglink_crc = llvm::crc32(0, llvm::arrayRefFromStringRef(raw_data));
}
@@ -295,7 +295,7 @@ size_t ObjectFilePECOFF::GetModuleSpecifications(
const auto *map = GetGlobalPluginProperties().ModuleABIMap();
if (map->GetNumValues() > 0) {
// Step 1: Try with the exact file name.
- auto name = file.GetLastPathComponent();
+ auto name = file.GetFilename();
module_env_option = map->GetValueForKey(name);
if (!module_env_option) {
// Step 2: Try with the file name in lowercase.