This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Change parameter type of StructuredData::ParseJSON
ClosedPublic

Authored by bulbazord on Apr 17 2023, 4:15 PM.

Details

Summary

Instead of taking a const std::string & we can take an
llvm::StringRef. The motivation for this change is that many of the
callers of ParseJSON end up creating a temporary std::string from an existing
StringRef or const char * in order to satisfy the API. There's no
reason we need to do this.

Diff Detail

Event Timeline

bulbazord created this revision.Apr 17 2023, 4:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 4:15 PM
bulbazord requested review of this revision.Apr 17 2023, 4:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 4:15 PM
mib accepted this revision.Apr 17 2023, 4:23 PM

LGTM!

This revision is now accepted and ready to land.Apr 17 2023, 4:23 PM
JDevlieghere accepted this revision.Apr 17 2023, 4:36 PM