Skip to content

[LLDB][NFC] Replace DWARFUnit with DWARFExpression::Delegate in DWARFExpressionList too #133049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions lldb/include/lldb/Expression/DWARFExpressionList.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@

namespace lldb_private {

namespace plugin {
namespace dwarf {
class DWARFUnit;
} // namespace dwarf
} // namespace plugin

/// \class DWARFExpressionList DWARFExpressionList.h
/// "lldb/Expression/DWARFExpressionList.h" Encapsulates a range map from file
/// address range to a single DWARF location expression.
Expand All @@ -30,13 +24,13 @@ class DWARFExpressionList {
DWARFExpressionList() = default;

DWARFExpressionList(lldb::ModuleSP module_sp,
const plugin::dwarf::DWARFUnit *dwarf_cu,
const DWARFExpression::Delegate *dwarf_cu,
lldb::addr_t func_file_addr)
: m_module_wp(module_sp), m_dwarf_cu(dwarf_cu),
m_func_file_addr(func_file_addr) {}

DWARFExpressionList(lldb::ModuleSP module_sp, DWARFExpression expr,
const plugin::dwarf::DWARFUnit *dwarf_cu)
const DWARFExpression::Delegate *dwarf_cu)
: m_module_wp(module_sp), m_dwarf_cu(dwarf_cu) {
AddExpression(0, LLDB_INVALID_ADDRESS, expr);
}
Expand Down Expand Up @@ -139,7 +133,7 @@ class DWARFExpressionList {
/// The DWARF compile unit this expression belongs to. It is used to evaluate
/// values indexing into the .debug_addr section (e.g. DW_OP_GNU_addr_index,
/// DW_OP_GNU_const_index)
const plugin::dwarf::DWARFUnit *m_dwarf_cu = nullptr;
const DWARFExpression::Delegate *m_dwarf_cu = nullptr;

// Function base file address.
lldb::addr_t m_func_file_addr = LLDB_INVALID_ADDRESS;
Expand Down
1 change: 0 additions & 1 deletion lldb/source/Expression/DWARFExpressionList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "lldb/Expression/DWARFExpressionList.h"
#include "Plugins/SymbolFile/DWARF/DWARFUnit.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StackFrame.h"
Expand Down