Skip to content

Commit 7154a39

Browse files
authored
[lldb][nfc] Remove unused member Disassembler::m_base_addr (#89289)
This member variable is completely unused. I also don't think it makes a ton of sense since (1) The "base address" can be obtained from the first Instruction in its InstructionList, and (2) InstructionLists may not be a series of contiguous instructions (even though they are most of the time).
1 parent 0c41eea commit 7154a39

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

lldb/include/lldb/Core/Disassembler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@ class Disassembler : public std::enable_shared_from_this<Disassembler>,
547547
// Classes that inherit from Disassembler can see and modify these
548548
ArchSpec m_arch;
549549
InstructionList m_instruction_list;
550-
lldb::addr_t m_base_addr;
551550
std::string m_flavor;
552551

553552
private:

lldb/source/Core/Disassembler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,8 +1117,7 @@ size_t Disassembler::ParseInstructions(Target &target, Address start,
11171117

11181118
// Disassembler copy constructor
11191119
Disassembler::Disassembler(const ArchSpec &arch, const char *flavor)
1120-
: m_arch(arch), m_instruction_list(), m_base_addr(LLDB_INVALID_ADDRESS),
1121-
m_flavor() {
1120+
: m_arch(arch), m_instruction_list(), m_flavor() {
11221121
if (flavor == nullptr)
11231122
m_flavor.assign("default");
11241123
else

0 commit comments

Comments
 (0)