[cfe-dev] Proposed change to newFrontendActionFactory() requirements

Vane, Edwin edwin.vane at intel.com
Mon May 27 09:35:39 PDT 2013


Hi all,

Currently, newFrontendActionFactory(Arg) requires Arg implement a function called newASTConsumer(). I'd like to change this requirement slightly and have newASTConsumer() take a pointer to a CompilerInstance like this:

ASTConsumer *newASTConsumer(const CompilerInstance *CI);

The goal is to give the created ASTConsumer access to the CompilerInstance and anything it creates, the Preprocessor object in particular. I figured this was useful enough to warrant breaking current users of newASTConsumer. I'll fix any breakages in clang and clang-tools-extra.

Any objections? Any suggestions for alternate implementations? E.g. should I instead provide an alternate function for newFrontendActionFactory()?

--
Edwin Vane
  Software Developer
  Intel of Canada, Inc.





More information about the cfe-dev mailing list