Every call to the protected SBAddress constructor takes the address of a valid object which means we might as well pass it as a const reference instead of a pointer and drop the null check.
Details
Details
Diff Detail
Diff Detail
Paths
| Differential D88249
[lldb] Make protected ctor and method of SBAddress take a const reference instead of a pointer. ClosedPublic Authored by JDevlieghere on Sep 24 2020, 10:49 AM.
Details Summary Every call to the protected SBAddress constructor takes the address of a valid object which means we might as well pass it as a const reference instead of a pointer and drop the null check.
Diff Detail Event TimelineJDevlieghere created this revision. This revision is now accepted and ready to land.Sep 25 2020, 6:11 AM Closed by commit rG6cd4a4cd02db: [lldb] Pass reference instead of pointer in protected SBAddress methods. (authored by JDevlieghere). · Explain WhySep 25 2020, 11:47 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 294113 lldb/include/lldb/API/SBAddress.h
lldb/source/API/SBAddress.cpp
lldb/source/API/SBBreakpointLocation.cpp
lldb/source/API/SBFrame.cpp
lldb/source/API/SBFunction.cpp
lldb/source/API/SBInstruction.cpp
lldb/source/API/SBLineEntry.cpp
lldb/source/API/SBQueueItem.cpp
lldb/source/API/SBSymbol.cpp
lldb/source/API/SBValue.cpp
|
the Address( part is redundant.