Skip to content

Commit 7ffa491

Browse files
[lldb] Remove unused local variables (NFC) (#140989)
1 parent bf241e8 commit 7ffa491

File tree

5 files changed

+0
-13
lines changed

5 files changed

+0
-13
lines changed

lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6649,7 +6649,6 @@ CreateAllImageInfosPayload(const lldb::ProcessSP &process_sp,
66496649

66506650
offset_t current_string_offset = start_of_filenames;
66516651
offset_t current_segaddrs_offset = start_of_seg_vmaddrs;
6652-
std::vector<struct image_entry> image_entries;
66536652
for (size_t i = 0; i < modules_count; i++) {
66546653
ModuleSP module_sp = modules.GetModuleAtIndex(i);
66556654

lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,6 @@ bool ProcessMachCore::DoUpdateThreadList(ThreadList &old_thread_list,
658658
ObjectFile *core_objfile = m_core_module_sp->GetObjectFile();
659659

660660
if (core_objfile) {
661-
std::set<lldb::tid_t> used_tids;
662661
const uint32_t num_threads = core_objfile->GetNumThreadContexts();
663662
std::vector<lldb::tid_t> tids;
664663
if (core_objfile->GetCorefileThreadExtraInfos(tids)) {

lldb/source/Target/DynamicRegisterInfo.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ DynamicRegisterInfo::SetRegisterInfo(const StructuredData::Dictionary &dict,
245245
// 'encoding':'uint' , 'format':'hex' , 'set': 0, 'ehframe' : 2,
246246
// 'dwarf' : 2, 'generic':'arg4', 'alt-name':'arg4', },
247247
RegisterInfo reg_info;
248-
std::vector<uint32_t> value_regs;
249-
std::vector<uint32_t> invalidate_regs;
250248
memset(&reg_info, 0, sizeof(reg_info));
251249

252250
llvm::StringRef name_val;

lldb/source/Target/Statistics.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ llvm::json::Value DebuggerStats::ReportStatistics(
309309
uint32_t debug_index_saved = 0;
310310
uint64_t debug_info_size = 0;
311311

312-
std::vector<ModuleStats> modules;
313312
std::lock_guard<std::recursive_mutex> guard(
314313
Module::GetAllocationModuleCollectionMutex());
315314
const uint64_t num_modules = target != nullptr

lldb/unittests/Utility/DataEncoderTest.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ TEST(DataEncoderTest, PutU8) {
4141

4242
TEST(DataEncoderTest, AppendUnsignedLittle) {
4343
const uint32_t addr_size = 4;
44-
std::vector<uint8_t> expected;
4544
DataEncoder encoder(lldb::eByteOrderLittle, addr_size);
4645
encoder.AppendU8(0x11);
4746
ASSERT_EQ(encoder.GetData(), ArrayRef<uint8_t>({0x11}));
@@ -59,7 +58,6 @@ TEST(DataEncoderTest, AppendUnsignedLittle) {
5958

6059
TEST(DataEncoderTest, AppendUnsignedBig) {
6160
const uint32_t addr_size = 4;
62-
std::vector<uint8_t> expected;
6361
DataEncoder encoder(lldb::eByteOrderBig, addr_size);
6462
encoder.AppendU8(0x11);
6563
ASSERT_EQ(encoder.GetData(), ArrayRef<uint8_t>({0x11}));
@@ -76,7 +74,6 @@ TEST(DataEncoderTest, AppendUnsignedBig) {
7674

7775
TEST(DataEncoderTest, AppendAddress4Little) {
7876
const uint32_t addr_size = 4;
79-
std::vector<uint8_t> expected;
8077
DataEncoder encoder(lldb::eByteOrderLittle, addr_size);
8178
encoder.AppendAddress(0x11223344);
8279
ASSERT_EQ(encoder.GetData(), ArrayRef<uint8_t>({0x44, 0x33, 0x22, 0x11}));
@@ -87,7 +84,6 @@ TEST(DataEncoderTest, AppendAddress4Little) {
8784

8885
TEST(DataEncoderTest, AppendAddress4Big) {
8986
const uint32_t addr_size = 4;
90-
std::vector<uint8_t> expected;
9187
DataEncoder encoder(lldb::eByteOrderBig, addr_size);
9288
encoder.AppendAddress(0x11223344);
9389
ASSERT_EQ(encoder.GetData(), ArrayRef<uint8_t>({0x11, 0x22, 0x33, 0x44}));
@@ -98,7 +94,6 @@ TEST(DataEncoderTest, AppendAddress4Big) {
9894

9995
TEST(DataEncoderTest, AppendAddress8Little) {
10096
const uint32_t addr_size = 8;
101-
std::vector<uint8_t> expected;
10297
DataEncoder encoder(lldb::eByteOrderLittle, addr_size);
10398
encoder.AppendAddress(0x11223344);
10499
ASSERT_EQ(encoder.GetData(),
@@ -111,7 +106,6 @@ TEST(DataEncoderTest, AppendAddress8Little) {
111106

112107
TEST(DataEncoderTest, AppendAddress8Big) {
113108
const uint32_t addr_size = 8;
114-
std::vector<uint8_t> expected;
115109
DataEncoder encoder(lldb::eByteOrderBig, addr_size);
116110
encoder.AppendAddress(0x11223344);
117111
ASSERT_EQ(encoder.GetData(),
@@ -124,7 +118,6 @@ TEST(DataEncoderTest, AppendAddress8Big) {
124118

125119
TEST(DataEncoderTest, AppendData) {
126120
const uint32_t addr_size = 4;
127-
std::vector<uint8_t> expected;
128121
DataEncoder encoder(lldb::eByteOrderBig, addr_size);
129122
// Make sure default constructed StringRef appends nothing
130123
encoder.AppendData(StringRef());
@@ -139,7 +132,6 @@ TEST(DataEncoderTest, AppendData) {
139132

140133
TEST(DataEncoderTest, AppendCString) {
141134
const uint32_t addr_size = 4;
142-
std::vector<uint8_t> expected;
143135
DataEncoder encoder(lldb::eByteOrderBig, addr_size);
144136
// Make sure default constructed StringRef appends nothing
145137
encoder.AppendCString(StringRef());

0 commit comments

Comments
 (0)