This is an archive of the discontinued LLVM Phabricator instance.

[AST] Remove implicit includes from introspection generation.
DraftPublic

Authored by njames93 on Apr 12 2021, 9:09 AM.
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
steveire
Summary

Run ast dump twice with implicit includes defined and not defined. This increases coverage as some systems require them, others will fail with them.

Diff Detail

Event Timeline

njames93 created this revision.Apr 12 2021, 9:09 AM
njames93 updated this revision to Diff 336961.Apr 12 2021, 2:19 PM

Factor out changes

njames93 retitled this revision from [AST] Tweak introspection generation to [AST] Remove implicit includes from introspection generation..Apr 12 2021, 2:19 PM
njames93 edited the summary of this revision. (Show Details)

The old impl for me was resulting in these kinds of errors during parsing.

/usr/include/c++/10/cstdint:52:11: error: no member named 'int_fast8_t' in the global namespace
  using ::int_fast8_t;
        ~~^

After removing the implicit includes, these errors went away and generation completed as intended.

njames93 updated this revision to Diff 338359.Apr 18 2021, 1:00 AM
njames93 edited the summary of this revision. (Show Details)

Run 2 invocations, one with implicit includes, one without them. If either has no errors the json will be generated, otherwise an empty implementation will be emitted.
Some systems seem to require the implicit includes, others, including mine, will fail with them defined.

Run 2 invocations, one with implicit includes, one without them. If either has no errors the json will be generated, otherwise an empty implementation will be emitted.
Some systems seem to require the implicit includes, others, including mine, will fail with them defined.

Instead of running it twice, it would be better if we understood better what the problem is.

I can't reproduce any problem with the implicit includes present. Can you reduce the code being compiled by the tool to find out why their presence causes a problem?