[Lldb-commits] [lldb] [lldb] Remove ConstString from ObjectFile (PR #232553)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 19 19:41:58 PDT 2026


================
@@ -96,14 +96,15 @@ ObjectFileSP ObjectFile::FindPlugin(const lldb::ModuleSP &module_sp,
     module_sp->GetFileSpec().GetPath(path_with_object);
 
     FileSpec archive_file;
-    ConstString archive_object;
+    llvm::StringRef archive_object;
     const bool must_exist = true;
     if (ObjectFile::SplitArchivePathWithObject(path_with_object, archive_file,
                                                archive_object, must_exist)) {
       file_size = FileSystem::Instance().GetByteSize(archive_file);
       if (file_size > 0) {
         file = &archive_file;
-        module_sp->SetFileSpecAndObjectName(archive_file, archive_object);
+        module_sp->SetFileSpecAndObjectName(archive_file,
----------------
jasonmolenda wrote:

You're adding the archive object to the const string pool here, looking at Module.cpp, doesn't seem to be a compelling reason for that.  Is a future PR going to change Module.cpp's `m_object_name` to a std::string?

https://github.com/llvm/llvm-project/pull/232553


More information about the lldb-commits mailing list