Page MenuHomePhabricator

[TableGen] Add backend to generate command guide for tools using libOption.
ClosedPublic

Authored by JDevlieghere on Nov 22 2019, 11:08 AM.

Details

Summary

For lldb and dsymutil, the command guide is essentially a copy of its help output generated by libOption. Making sure the two stay in sync is tedious and error prone. Given that we already generate the help from a tablegen file, we might as well generate the RST as well.

This adds a tablegen backend for generating Sphinx/RST command guides from the tablegen file.

Diff Detail

Event Timeline

JDevlieghere created this revision.Nov 22 2019, 11:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 22 2019, 11:08 AM

Build result: pass - 60250 tests passed, 0 failed and 732 were skipped.

Log files: console-log.txt, CMakeCache.txt

Bigcheese added inline comments.Nov 22 2019, 12:26 PM
llvm/utils/TableGen/OptEmitter.h
15

Is this used outside the definition of CompareOptionRecords?

JDevlieghere marked 2 inline comments as done.
JDevlieghere added inline comments.
llvm/utils/TableGen/OptEmitter.h
15

Doesn't look like it. I'll move it into the implementation.

This revision is now accepted and ready to land.Nov 22 2019, 1:08 PM
This revision was automatically updated to reflect the committed changes.