[cfe-dev] Merging AST from Multiple Translation Units

Uri Mann umann at symantec.com
Tue Jun 16 17:41:46 PDT 2015

Hello everyone;

I'm trying to create a tool which transforms source using a class derived from ASTFrontendAction. The tool need to transform one or more source files and then produce a final source file which can reference symbols from all of the processed source files. I tried to use ASTMergeAction class by saving the ASTUnit at the inside my class's EndSourceFileAction(). But when the files are merged, ASTImporter emits multiple errors "cannot import unsupported AST node xxx". Is this the right way to do it?

Thanks in advance.

More information about the cfe-dev mailing list