Page MenuHomePhabricator

[NFC][llvm-dwarfdump] Always use 'const Twine &'
ClosedPublic

Authored by djtodoro on Mar 6 2020, 1:24 AM.

Details

Summary

According to the Twine.h comment, the Twines should only be used as const references in arguments.

Diff Detail

Event Timeline

djtodoro created this revision.Mar 6 2020, 1:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2020, 1:24 AM
jhenderson accepted this revision.Mar 6 2020, 1:43 AM

LGTM, assuming this builds cleanly. I don't pretend to be an expert on Twine though, so somebody with more experience with it might want to give their opinion first.

This revision is now accepted and ready to land.Mar 6 2020, 1:43 AM
djtodoro updated this revision to Diff 248693.Mar 6 2020, 4:04 AM

-Rebasing

probinson accepted this revision.Mar 9 2020, 6:44 AM
probinson added a subscriber: probinson.

Twine can be the root of an arbitrary tree, and is not intended to be copied, the way StringRef is. Passing by const ref is correct.
LGTM.

djtodoro updated this revision to Diff 249303.Mar 10 2020, 3:54 AM

-Reorder the patches from the stack

Thanks for the reviews, I'll land this.

This revision was automatically updated to reflect the committed changes.