This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Revert r231274: "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"
ClosedPublic

Authored by hintonda on Apr 21 2019, 2:29 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

hintonda created this revision.Apr 21 2019, 2:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2019, 2:29 PM
dblaikie added inline comments.Apr 22 2019, 12:55 PM
llvm/include/llvm/Support/CommandLine.h
901–902 ↗(On Diff #196021)

Might as well make the dtor public and virtual in the basic_parser class & remove all these explicitly virtual dtor definitions in the derived classes, I guess?

This seems to reversing r231221 which devirtualized this. What kind of customization are you envisioning? There aren't many methods here. Are you planning to override the parse method but still fall back to the base class version sometimes?

This seems to reversing r231221 which devirtualized this. What kind of customization are you envisioning? There aren't many methods here. Are you planning to override the parse method but still fall back to the base class version sometimes?

Sorry, yeah, there's some missing context in this review description - it was discussed on llvm-dev here: http://lists.llvm.org/pipermail/llvm-dev/2019-April/131873.html

hintonda marked an inline comment as done.Apr 23 2019, 7:52 AM

This seems to reversing r231221 which devirtualized this. What kind of customization are you envisioning? There aren't many methods here. Are you planning to override the parse method but still fall back to the base class version sometimes?

Sorry, yeah, there's some missing context in this review description - it was discussed on llvm-dev here: http://lists.llvm.org/pipermail/llvm-dev/2019-April/131873.html

Sorry, I'll update the description. As stated in the thread, I want to customize the std::string parser, specifically the parse method, to treat the string as a yaml file name, and use yaml::Input to populate a struct containing all my options. I also customize the bool parser to tread it as a flag to generate an example yaml file to give users something to start with.

llvm/include/llvm/Support/CommandLine.h
901–902 ↗(On Diff #196021)

Thanks -- will do. I should have looked at the original diff first instead of just mechanically applying my spot fix to everything else.

hintonda updated this revision to Diff 196508.Apr 24 2019, 1:15 PM

Revert "Recommit r231221: "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final""

hintonda retitled this revision from [llvm] Remove final and add default virtual dtor to CommandLine parsers to [llvm] Revert "Recommit r231221: "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"".Apr 24 2019, 1:17 PM
hintonda edited the summary of this revision. (Show Details)

David, I think you're okay with this but just wanted to double check. thanks... don

dblaikie accepted this revision.May 1 2019, 8:55 AM

Sorry, the title's multiple negatives confuse me a bit.

Maybe just "Revert r231221: ..." and then in the description explain why it's being reverted, and the history of it being previously reverted/reapplied (including why the revert was rolled back, and why this attempt to revert is different/addresses that problem).

This revision is now accepted and ready to land.May 1 2019, 8:55 AM

Sorry, the title's multiple negatives confuse me a bit.

No worries. I used git llvm revert to generate it, and just retitled with its suggestion.

Maybe just "Revert r231221: ..." and then in the description explain why it's being reverted, and the history of it being previously reverted/reapplied (including why the revert was rolled back, and why this attempt to revert is different/addresses that problem).

Perfect, I'll do that. Thanks...

hintonda retitled this revision from [llvm] Revert "Recommit r231221: "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"" to [llvm] Revert r231274: "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final".May 3 2019, 7:18 AM
hintonda edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.