Page MenuHomePhabricator

[lldb][NFC] Format lldb/include/lldb/Symbol/Type.h
ClosedPublic

Authored by ljmf00 on Nov 10 2021, 12:52 PM.

Diff Detail

Event Timeline

ljmf00 requested review of this revision.Nov 10 2021, 12:52 PM
ljmf00 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2021, 12:52 PM
teemperor accepted this revision.Nov 10 2021, 3:16 PM
teemperor added a subscriber: teemperor.

I guess that's just clang-format ran over the file? If yes, then LGTM

lldb/include/lldb/Symbol/Type.h
70–90

FWIW, we usually update the comments to something less >squished< such as:

///< This type is the type whose UID is m_encoding_uid
eEcodingIsUID.
/// This type is the type whose UID is m_encoding_uid with the const qualifier added
eEncodingIsConstUID,

I think this patch is good as-is, but there would be bonus points for fixing up the comment style :)

This revision is now accepted and ready to land.Nov 10 2021, 3:16 PM
teemperor added inline comments.Nov 10 2021, 3:17 PM
lldb/include/lldb/Symbol/Type.h
70–90

I meant

/// This type is the type whose UID is m_encoding_uid
eEcodingIsUID.
/// This type is the type whose UID is m_encoding_uid with the const qualifier added
eEncodingIsConstUID,
ljmf00 updated this revision to Diff 386361.Nov 10 2021, 5:01 PM

Can you check now? If looks good, can you land it please?

lldb/include/lldb/Symbol/Type.h
70–90

Done

Friendly ping, maybe you forgot this, can you check it now @teemperor ? :)

JDevlieghere accepted this revision.Nov 17 2021, 10:22 AM

LGTM modulo the inline comment.

lldb/include/lldb/Symbol/Type.h
204

Since you're touching this line... The coding standards say that StringRefs should always be passed by-value:

StringRef is small and pervasive enough in LLVM that it should always be passed by value.

https://llvm.org/docs/ProgrammersManual.html#the-stringref-class

ljmf00 updated this revision to Diff 389836.Nov 25 2021, 10:13 AM

LGTM modulo the inline comment.

I addressed what you requested. Please review. If it is good to land, please do, as I don't have permissions.

ljmf00 retitled this revision from [lldb] Format lldb/include/lldb/Symbol/Type.h to [lldb][NFC] Format lldb/include/lldb/Symbol/Type.h.Nov 29 2021, 3:41 PM
This revision was automatically updated to reflect the committed changes.
dblaikie added inline comments.
lldb/include/lldb/Symbol/Type.h
207–208

Looks like this could've broken some tests - might be best to revert and retest?

The const StringRef& should've been changed to StringRef per @JDevlieghere's comment, but the non-const StringRef& were/are probably load-bearing - they're the result of calling this function (using mutable ref parameters as "out" parameters) & passing them by value breaks that.

ljmf00 reopened this revision.Nov 29 2021, 4:54 PM
This revision is now accepted and ready to land.Nov 29 2021, 4:54 PM
dblaikie requested changes to this revision.Nov 29 2021, 5:06 PM
dblaikie added inline comments.
lldb/include/lldb/Symbol/Type.h
206–207
lldb/source/Symbol/Type.cpp
667–668
This revision now requires changes to proceed.Nov 29 2021, 5:06 PM
ljmf00 updated this revision to Diff 394001.Dec 13 2021, 12:09 PM

Sorry for the delay. Can you re-review this @dblaikie ?

dblaikie accepted this revision.Dec 13 2021, 2:21 PM

Looks alright

This revision is now accepted and ready to land.Dec 13 2021, 2:21 PM
This revision was automatically updated to reflect the committed changes.