Page MenuHomePhabricator

[libc] Expose APIGenerator.
ClosedPublic

Authored by PaulkaToast on May 29 2020, 7:33 PM.

Details

Summary

This is split off from D79192 and exposes APIGenerator (renames to APIIndexer) for use in generating the integrations tests.

Diff Detail

Event Timeline

PaulkaToast created this revision.May 29 2020, 7:33 PM

Mostly LGTM with few minor comments.

libc/utils/HdrGen/PublicAPICommand.cpp
185–189

After renaming the class to APIIndexer, the write method should be decoupled from the class and given a name say writeAPIFromIndex or something. AFAICT, it only needs access to the members you have made public in this patch.

libc/utils/HdrGen/PublicAPICommand.h
28

These names are generic enough that they should be nested in the class. You can make them public if you want.

39

At this point, it probably makes sense to call this class APIIndexer?

65

Can you add comments explaining the difference between the two constructors?

67

Empty line after this?

PaulkaToast marked 4 inline comments as done.
PaulkaToast edited the summary of this revision. (Show Details)
PaulkaToast marked an inline comment as done.Jun 1 2020, 6:59 AM
PaulkaToast added inline comments.
libc/utils/HdrGen/PublicAPICommand.h
39

Yeah, the primary function of this is to read the TableGen files so this name makes more sense. (:
This was the same reasoning behind naming the exposed class APIReader from my previous patch.

sivachandra accepted this revision.Jun 1 2020, 2:28 PM
This revision is now accepted and ready to land.Jun 1 2020, 2:28 PM
This revision was automatically updated to reflect the committed changes.