This is an archive of the discontinued LLVM Phabricator instance.

[lldb][NFCI] TestEmulation should take a Stream ref
ClosedPublic

Authored by bulbazord on Jul 7 2023, 9:12 PM.

Details

Summary

Instruction::TestEmulation takes a Stream * and checks it for validity.
However, this is unnecessary as we can always ensure that we never pass
nullptr for the Stream argument. The only use of
Instruction::TestEmulation currently is SBInstruction::TestEmulation
which gets the Stream from an SBStream, and SBStream::ref can
return a Stream & guaranteed.

Diff Detail

Event Timeline

bulbazord created this revision.Jul 7 2023, 9:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 7 2023, 9:12 PM
bulbazord requested review of this revision.Jul 7 2023, 9:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 7 2023, 9:12 PM
DavidSpickett accepted this revision.Jul 10 2023, 2:24 AM
DavidSpickett added a reviewer: DavidSpickett.
DavidSpickett added a subscriber: DavidSpickett.

LGTM. Always happy to see never-null pointers get updated.

This revision is now accepted and ready to land.Jul 10 2023, 2:24 AM
fdeazeve accepted this revision.Jul 10 2023, 5:45 AM

Thanks for finding those!

This revision was automatically updated to reflect the committed changes.