[cfe-dev] minimal clang for AST use
cnuernber at gmail.com
Tue Nov 30 18:14:59 CST 2010
I am working to build a minimal clang that doesn't include any llvm
code generation abilities. This is intended to analyze a source code
base and produce various code generation files based on the clang AST.
I modified various files and such to remove most of llvm (except
LLVMSupport) from the mix; if anyone is interested I could tell you
exactly what I did.
One thing that would be neat would be if someone were to build an
application to enable quick creation of code generators. If we could
map the AST to a more useable scripting system and thus quickly write
an action that processed the AST from one or multiple files combined.
The key would be to map the AST to some generic and easily scriptable
object model (or map a scripting system to the AST directly).
Then another thing about this is that the system automatically clears
the AST and preprocessor when processing files on the command line. I
work around this by creating a header that includes everything I want
and then only specifying this header on the command line.
Anyway, just some thoughts. It looks like I will be spending time
code generating some more things and a little more slick framework for
this use case would be sweet.
A foolish consistency is the hobgoblin of little minds - Emerson
More information about the cfe-dev