[cfe-dev] Declarations for a single file, not complete translation unit?

Jacob Carlborg doob at me.com
Mon Dec 27 12:21:57 PST 2010


I'm working on a source to source translator which translates 
Objective-C/C code into D code. I've subclassed ASTConsumer to create 
something similar to the Objective-C rewriter.

The problem I have is that I'm receiving declarations for a complete 
translation unit via HandleTopLevelDecl function. I'm wondering if it's 
possible somehow to receive (or filter) the declarations for a single 
file instead of a complete translation unit. I would like to have a one 
to one mapping between the original files and the translated files.

-- 
/Jacob Carlborg




More information about the cfe-dev mailing list