This is an archive of the discontinued LLVM Phabricator instance.

[OptParser] NFC: Remove unused template arg 'name' from bool opt
ClosedPublic

Authored by c-rhodes on Sep 9 2021, 12:42 AM.

Diff Detail

Event Timeline

c-rhodes created this revision.Sep 9 2021, 12:42 AM
c-rhodes requested review of this revision.Sep 9 2021, 12:42 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 9 2021, 12:42 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

@jansvoboda11 this came up in D109359 with warning:

llvm/include/llvm/Option/OptParser.td:217:91: warning: unused template argument: MarshallingInfoBooleanFlag:name

I see you've changed worked on this in the past, wasn't sure if it's intended for name not to be used so thought I'd post the patch and let you take a look.

jansvoboda11 accepted this revision.Sep 9 2021, 3:52 AM

LGTM.

To give more background, I think my intention was to add an assertion that name and other_name are the same (except for the no_ part) and I was waiting for TableGen assertions to land. But I don't think that's too valuable, since the callers already ensure that by some other mechanism. This should be fine to remove.

This revision is now accepted and ready to land.Sep 9 2021, 3:52 AM

LGTM.

To give more background, I think my intention was to add an assertion that name and other_name are the same (except for the no_ part) and I was waiting for TableGen assertions to land. But I don't think that's too valuable, since the callers already ensure that by some other mechanism. This should be fine to remove.

No worries thanks for clarifying!