Skip to content

Commit d695eb0

Browse files
[lldb][nfc] Rename WritePointerToMemory argument's name (llvm#157566)
One of those arguments should be called `pointer` to correlate it to the name of the function and to distinguish it from the address where it will be written. (cherry picked from commit d367c7d)
1 parent 8cc7914 commit d695eb0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lldb/include/lldb/Expression/IRMemoryMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class IRMemoryMap {
5959
size_t size, Status &error);
6060
void WriteScalarToMemory(lldb::addr_t process_address, Scalar &scalar,
6161
size_t size, Status &error);
62-
void WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t address,
62+
void WritePointerToMemory(lldb::addr_t process_address, lldb::addr_t pointer,
6363
Status &error);
6464
void ReadMemory(uint8_t *bytes, lldb::addr_t process_address, size_t size,
6565
Status &error);

lldb/source/Expression/IRMemoryMap.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -635,19 +635,19 @@ void IRMemoryMap::WriteScalarToMemory(lldb::addr_t process_address,
635635
}
636636

637637
void IRMemoryMap::WritePointerToMemory(lldb::addr_t process_address,
638-
lldb::addr_t address, Status &error) {
638+
lldb::addr_t pointer, Status &error) {
639639
error.Clear();
640640

641-
/// Only ask the Process to fix the address if this address belongs to the
641+
/// Only ask the Process to fix `pointer` if the address belongs to the
642642
/// process. An address belongs to the process if the Allocation policy is not
643643
/// eAllocationPolicyHostOnly.
644-
auto it = FindAllocation(address, 1);
644+
auto it = FindAllocation(pointer, 1);
645645
if (it == m_allocations.end() ||
646646
it->second.m_policy != AllocationPolicy::eAllocationPolicyHostOnly)
647647
if (auto process_sp = GetProcessWP().lock())
648-
address = process_sp->FixAnyAddress(address);
648+
pointer = process_sp->FixAnyAddress(pointer);
649649

650-
Scalar scalar(address);
650+
Scalar scalar(pointer);
651651

652652
WriteScalarToMemory(process_address, scalar, GetAddressByteSize(), error);
653653
}

0 commit comments

Comments
 (0)