[lldb][NFC] Simplify GetLocation_DW_OP_addr function
authorFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Fri, 30 Jun 2023 21:26:37 +0000 (17:26 -0400)
committerFelipe de Azevedo Piovezan <fpiovezan@apple.com>
Mon, 3 Jul 2023 12:36:57 +0000 (08:36 -0400)
commitf292ca136240a9c694aa280ad7fd0b961930804a
treeeb57ffca2f8e26ad805f85f8db75ae5d52bec079
parent379b59d1b0f3e1ddc421f706e9de65e52acad0cb
[lldb][NFC] Simplify GetLocation_DW_OP_addr function

A very old commit (9422dd64f870dd33) changed the signature of this function in a
number of ways. This patch aims to improve it:

1. Reword the documentation, which still mentions old parameters that no longer
exist, and to elaborate upon the behavior of this function.
2. Remove the unnecessary parameter `op_addr_idx`. This parameter is odd in a
couple of ways: we never use it with a value that is non-zero, and the matching
`Update_DW_OP_addr` function doesn't use a similar parameter. We also document
that this new behavior. If we ever decide to handle multiple "DW_OP_addr", we
can introduce the complexity again.

Differential Revision: https://reviews.llvm.org/D154265
lldb/include/lldb/Expression/DWARFExpression.h
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp