mirror of
https://github.com/nasa/trick.git
synced 2024-12-20 21:53:10 +00:00
14a75508a3
Changed all header file once include variables to follow the same naming convention and not start with any underscores. Also deleted old incorrect copyright notices. Also removed $Id: tags from all files. Fixes #14. Fixes #22.
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
|
|
#ifndef ICGASTCONSUMER_HH
|
|
#define ICGASTCONSUMER_HH
|
|
|
|
#include "clang/AST/ASTConsumer.h"
|
|
#include "clang/Sema/SemaConsumer.h"
|
|
#include "TranslationUnitVisitor.hh"
|
|
|
|
class HeaderSearchDirs ;
|
|
class CommentSaver ;
|
|
class PrintAttributes ;
|
|
|
|
/**
|
|
|
|
This class is passed to the clang parser as an ASTconsumer. We are
|
|
only interested in parsing the AST when all nodes are finished.
|
|
Therefore we only have a single TranslationUnit handler that will
|
|
handle everything.
|
|
|
|
@author Alexander S. Lin
|
|
|
|
@date July 2012
|
|
|
|
*/
|
|
|
|
|
|
class ICGASTConsumer : public clang::SemaConsumer {
|
|
public:
|
|
ICGASTConsumer( clang::CompilerInstance & in_ci , HeaderSearchDirs & in_hsd ,
|
|
CommentSaver & in_cs , PrintAttributes & in_pa ) ;
|
|
|
|
TranslationUnitVisitor & getTranslationUnitVisitor() ;
|
|
|
|
/** Called with the compiler is finished parsing everything */
|
|
void HandleTranslationUnit(clang::ASTContext &Ctx);
|
|
|
|
private:
|
|
|
|
/** The compiler instance */
|
|
clang::CompilerInstance & ci ;
|
|
|
|
/** The header search directories */
|
|
HeaderSearchDirs & hsd ;
|
|
|
|
/** The top level AST visitor. Called to parse tree in HandleTranslationUnit */
|
|
TranslationUnitVisitor tuv ;
|
|
|
|
|
|
};
|
|
|
|
#endif
|