This is an archive of the discontinued LLVM Phabricator instance.

A Python code model for C++ used to drive code generators
AbandonedPublic

Authored by jbcoe on Dec 18 2015, 2:05 PM.

Details

Summary

I have written a very simple code model for C++ code to allow template-based code generators to consume information from a clang AST.

It is used in an (early stage) open source project: https://github.com/jbcoe/C_API_generation

While the code generator is perhaps a bit use-specific I think that the c++ code model would allow many more people to make easy use of information from libclang through Python.

There are no changes to existing code in this diff, just new code and tests.

Diff Detail

Event Timeline

jbcoe updated this revision to Diff 43265.Dec 18 2015, 2:05 PM
jbcoe retitled this revision from to A Python code model for C++ used to drive code generators.
jbcoe updated this object.
jbcoe added reviewers: eliben, compnerd, skalinichev, akyrtzi.
jbcoe updated this object.

I was wondering if anyone had looked at this yet?

jbcoe added a comment.Jan 24 2016, 5:07 AM

I have updates to this patch if the broad-brush approach is of interest.

jbcoe updated this revision to Diff 47745.Feb 11 2016, 4:21 PM

I've added more python classes to handle types and free functions.

jbcoe updated this revision to Diff 47747.Feb 11 2016, 4:26 PM

Add missing test for types - apologies for noise.

jbcoe added a comment.Mar 1 2016, 12:14 PM

Has anyone had a chance to look over this?

jbcoe abandoned this revision.Apr 29 2016, 2:50 AM

I'm abandoning this revision for lack of interest.