Skip to content

Conversation

kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented May 22, 2025

@llvm/pr-subscribers-lldb

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/140989.diff

5 Files Affected:

  • (modified) lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (-1)
  • (modified) lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp (-1)
  • (modified) lldb/source/Target/DynamicRegisterInfo.cpp (-2)
  • (modified) lldb/source/Target/Statistics.cpp (-1)
  • (modified) lldb/unittests/Utility/DataEncoderTest.cpp (-8)
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 9d5e0f886a4a5..3950454b7c90e 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -6649,7 +6649,6 @@ CreateAllImageInfosPayload(const lldb::ProcessSP &process_sp,
 
   offset_t current_string_offset = start_of_filenames;
   offset_t current_segaddrs_offset = start_of_seg_vmaddrs;
-  std::vector<struct image_entry> image_entries;
   for (size_t i = 0; i < modules_count; i++) {
     ModuleSP module_sp = modules.GetModuleAtIndex(i);
 
diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
index 39584bad2d745..6037c8d2514b8 100644
--- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
+++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
@@ -658,7 +658,6 @@ bool ProcessMachCore::DoUpdateThreadList(ThreadList &old_thread_list,
     ObjectFile *core_objfile = m_core_module_sp->GetObjectFile();
 
     if (core_objfile) {
-      std::set<lldb::tid_t> used_tids;
       const uint32_t num_threads = core_objfile->GetNumThreadContexts();
       std::vector<lldb::tid_t> tids;
       if (core_objfile->GetCorefileThreadExtraInfos(tids)) {
diff --git a/lldb/source/Target/DynamicRegisterInfo.cpp b/lldb/source/Target/DynamicRegisterInfo.cpp
index b964dc5877a97..e3a055fa1ce32 100644
--- a/lldb/source/Target/DynamicRegisterInfo.cpp
+++ b/lldb/source/Target/DynamicRegisterInfo.cpp
@@ -245,8 +245,6 @@ DynamicRegisterInfo::SetRegisterInfo(const StructuredData::Dictionary &dict,
     // 'encoding':'uint' , 'format':'hex'         , 'set': 0, 'ehframe' : 2,
     // 'dwarf' : 2, 'generic':'arg4', 'alt-name':'arg4', },
     RegisterInfo reg_info;
-    std::vector<uint32_t> value_regs;
-    std::vector<uint32_t> invalidate_regs;
     memset(&reg_info, 0, sizeof(reg_info));
 
     llvm::StringRef name_val;
diff --git a/lldb/source/Target/Statistics.cpp b/lldb/source/Target/Statistics.cpp
index 499d1333c3d93..4cfd0629ea271 100644
--- a/lldb/source/Target/Statistics.cpp
+++ b/lldb/source/Target/Statistics.cpp
@@ -309,7 +309,6 @@ llvm::json::Value DebuggerStats::ReportStatistics(
   uint32_t debug_index_saved = 0;
   uint64_t debug_info_size = 0;
 
-  std::vector<ModuleStats> modules;
   std::lock_guard<std::recursive_mutex> guard(
       Module::GetAllocationModuleCollectionMutex());
   const uint64_t num_modules = target != nullptr
diff --git a/lldb/unittests/Utility/DataEncoderTest.cpp b/lldb/unittests/Utility/DataEncoderTest.cpp
index 5f5ff37bced1a..8d502f0f80b57 100644
--- a/lldb/unittests/Utility/DataEncoderTest.cpp
+++ b/lldb/unittests/Utility/DataEncoderTest.cpp
@@ -41,7 +41,6 @@ TEST(DataEncoderTest, PutU8) {
 
 TEST(DataEncoderTest, AppendUnsignedLittle) {
   const uint32_t addr_size = 4;
-  std::vector<uint8_t> expected;
   DataEncoder encoder(lldb::eByteOrderLittle, addr_size);
   encoder.AppendU8(0x11);
   ASSERT_EQ(encoder.GetData(), ArrayRef<uint8_t>({0x11}));
@@ -59,7 +58,6 @@ TEST(DataEncoderTest, AppendUnsignedLittle) {
 
 TEST(DataEncoderTest, AppendUnsignedBig) {
   const uint32_t addr_size = 4;
-  std::vector<uint8_t> expected;
   DataEncoder encoder(lldb::eByteOrderBig, addr_size);
   encoder.AppendU8(0x11);
   ASSERT_EQ(encoder.GetData(), ArrayRef<uint8_t>({0x11}));
@@ -76,7 +74,6 @@ TEST(DataEncoderTest, AppendUnsignedBig) {
 
 TEST(DataEncoderTest, AppendAddress4Little) {
   const uint32_t addr_size = 4;
-  std::vector<uint8_t> expected;
   DataEncoder encoder(lldb::eByteOrderLittle, addr_size);
   encoder.AppendAddress(0x11223344);
   ASSERT_EQ(encoder.GetData(), ArrayRef<uint8_t>({0x44, 0x33, 0x22, 0x11}));
@@ -87,7 +84,6 @@ TEST(DataEncoderTest, AppendAddress4Little) {
 
 TEST(DataEncoderTest, AppendAddress4Big) {
   const uint32_t addr_size = 4;
-  std::vector<uint8_t> expected;
   DataEncoder encoder(lldb::eByteOrderBig, addr_size);
   encoder.AppendAddress(0x11223344);
   ASSERT_EQ(encoder.GetData(), ArrayRef<uint8_t>({0x11, 0x22, 0x33, 0x44}));
@@ -98,7 +94,6 @@ TEST(DataEncoderTest, AppendAddress4Big) {
 
 TEST(DataEncoderTest, AppendAddress8Little) {
   const uint32_t addr_size = 8;
-  std::vector<uint8_t> expected;
   DataEncoder encoder(lldb::eByteOrderLittle, addr_size);
   encoder.AppendAddress(0x11223344);
   ASSERT_EQ(encoder.GetData(),
@@ -111,7 +106,6 @@ TEST(DataEncoderTest, AppendAddress8Little) {
 
 TEST(DataEncoderTest, AppendAddress8Big) {
   const uint32_t addr_size = 8;
-  std::vector<uint8_t> expected;
   DataEncoder encoder(lldb::eByteOrderBig, addr_size);
   encoder.AppendAddress(0x11223344);
   ASSERT_EQ(encoder.GetData(),
@@ -124,7 +118,6 @@ TEST(DataEncoderTest, AppendAddress8Big) {
 
 TEST(DataEncoderTest, AppendData) {
   const uint32_t addr_size = 4;
-  std::vector<uint8_t> expected;
   DataEncoder encoder(lldb::eByteOrderBig, addr_size);
   // Make sure default constructed StringRef appends nothing
   encoder.AppendData(StringRef());
@@ -139,7 +132,6 @@ TEST(DataEncoderTest, AppendData) {
 
 TEST(DataEncoderTest, AppendCString) {
   const uint32_t addr_size = 4;
-  std::vector<uint8_t> expected;
   DataEncoder encoder(lldb::eByteOrderBig, addr_size);
   // Make sure default constructed StringRef appends nothing
   encoder.AppendCString(StringRef());

@kazutakahirata kazutakahirata merged commit 7ffa491 into llvm:main May 22, 2025
12 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250521_unused_local_lldb branch May 22, 2025 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants