This is an archive of the discontinued LLVM Phabricator instance.

[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 Timeline

JDevlieghere requested review of this revision.Sep 24 2020, 10:49 AM
JDevlieghere created this revision.
werat accepted this revision.Sep 25 2020, 6:11 AM

Thanks for refactoring this!

This revision is now accepted and ready to land.Sep 25 2020, 6:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 25 2020, 11:47 AM

cool

lldb/source/API/SBValue.cpp
1359

the Address( part is redundant.