This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Simplify Log::PutString (NFC)
ClosedPublic

Authored by kastiglione on May 8 2023, 5:00 PM.

Details

Summary
  • As no format string is involved, avoid unecessary call into Printf
  • Eliminate creation of a std::string to print a StringRef

Diff Detail

Event Timeline

kastiglione created this revision.May 8 2023, 5:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 8 2023, 5:00 PM
kastiglione requested review of this revision.May 8 2023, 5:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 8 2023, 5:00 PM
bulbazord accepted this revision.May 8 2023, 5:11 PM

LGTM

lldb/source/Utility/Log.cpp
135

Amazing

151–152

We can probably update this comment as it's no longer true: Log::PutCString will skip Printf -> VAPrintf entirely now...

This revision is now accepted and ready to land.May 8 2023, 5:11 PM

Update comments too

kastiglione marked an inline comment as done.May 8 2023, 5:28 PM
This revision was automatically updated to reflect the committed changes.