This is an archive of the discontinued LLVM Phabricator instance.

[clang-tblgen] Add -print-records and -dump-json modes.
ClosedPublic

Authored by simon_tatham on Aug 15 2018, 5:28 AM.

Details

Summary

Currently, if clang-tblgen is run without a mode option, it defaults
to the first mode in its 'enum Action', which happens to be
-gen-clang-attr-classes. I think it makes more sense for it to behave
the same way as llvm-tblgen, i.e. print a diagnostic dump if it's not
given any more specific instructions.

I've also added the same -dump-json that llvm-tblgen supports. This
means any tblgen command line (whether llvm- or clang-) can be
mechanically turned into one that processes the same input into JSON.

Diff Detail

Repository
rL LLVM

Event Timeline

simon_tatham created this revision.Aug 15 2018, 5:28 AM
This revision is now accepted and ready to land.Aug 22 2018, 1:45 AM
This revision was automatically updated to reflect the committed changes.