This is an archive of the discontinued LLVM Phabricator instance.

[lldb][nfc] Remove redundant nullptr check
ClosedPublic

Authored by fdeazeve on Jul 3 2023, 9:49 AM.

Details

Reviewers
jdoerfert
JDevlieghere
Group Reviewers
Restricted Project
Commits
rGf470ab734c9b: [lldb][nfc] Remove redundant nullptr check
Summary

The make_shared function never returns a nullptr, as such the test for nullptr
is not needed. We also move the empty string check earlier in the if
("oso_object"), as this is cheaper than loading the object file.

Diff Detail

Event Timeline

fdeazeve created this revision.Jul 3 2023, 9:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 3 2023, 9:49 AM
fdeazeve requested review of this revision.Jul 3 2023, 9:49 AM
Herald added a project: Restricted Project. · View Herald Transcript
fdeazeve added a reviewer: Restricted Project.Jul 3 2023, 9:50 AM
This revision is now accepted and ready to land.Jul 3 2023, 11:26 AM
This revision was automatically updated to reflect the committed changes.