Skip to content

Commit ca8510c

Browse files
Consolidated DumpLocation and DumpLocationWithOptions using default DIDumpOptions instead of having to introduce new function
1 parent 9c5cb8f commit ca8510c

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

lldb/include/lldb/Expression/DWARFExpression.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ class DWARFExpression {
157157
return data.GetByteSize() > 0;
158158
}
159159

160-
void DumpLocation(Stream *s, lldb::DescriptionLevel level, ABI *abi) const;
161-
void DumpLocationWithOptions(Stream *s, lldb::DescriptionLevel level, ABI *abi, llvm::DIDumpOptions options) const;
160+
void DumpLocation(Stream *s, lldb::DescriptionLevel level, ABI *abi,
161+
llvm::DIDumpOptions options = {}) const;
162162

163163
bool MatchesOperand(StackFrame &frame, const Instruction::Operand &op) const;
164164

lldb/source/Core/Disassembler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ void Instruction::Dump(lldb_private::Stream *s, uint32_t max_opcode_byte_size,
773773
opts.ShowAddresses = false;
774774
opts.PrintRegisterOnly = true; // <-- important: suppress DW_OP_... annotations, etc.
775775

776-
entry.expr->DumpLocationWithOptions(&loc_str, eDescriptionLevelBrief, abi, opts);
776+
entry.expr->DumpLocation(&loc_str, eDescriptionLevelBrief, abi, opts);
777777

778778
// Only include if not empty.
779779
llvm::StringRef loc_clean = llvm::StringRef(loc_str.GetString()).trim();

lldb/source/Expression/DWARFExpression.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ void DWARFExpression::UpdateValue(uint64_t const_value,
6666
}
6767

6868
void DWARFExpression::DumpLocation(Stream *s, lldb::DescriptionLevel level,
69-
ABI *abi) const {
70-
llvm::DIDumpOptions DumpOpts;
71-
this->DumpLocationWithOptions(s, level, abi, DumpOpts);
72-
}
73-
74-
void DWARFExpression::DumpLocationWithOptions(Stream *s, lldb::DescriptionLevel level,
7569
ABI *abi, llvm::DIDumpOptions options) const {
7670
auto *MCRegInfo = abi ? &abi->GetMCRegisterInfo() : nullptr;
7771
auto GetRegName = [&MCRegInfo](uint64_t DwarfRegNum,

0 commit comments

Comments
 (0)