trick/trick_source/codegen/Interface_Code_Gen/ICGASTConsumer.cpp

22 lines
599 B
C++
Raw Normal View History

2015-02-26 15:02:31 +00:00
#include <iostream>
#include "clang/AST/ASTContext.h"
#include "ICGASTConsumer.hh"
ICGASTConsumer::ICGASTConsumer( clang::CompilerInstance & in_ci , HeaderSearchDirs & in_hsd ,
CommentSaver & in_cs , PrintAttributes & in_pa ) :
ci(in_ci) , hsd(in_hsd) , tuv(in_ci, in_hsd, in_cs, in_pa) {}
TranslationUnitVisitor & ICGASTConsumer::getTranslationUnitVisitor() {
return tuv ;
}
/**
@details
-# Traverse the translation unit declaration and everything it contains.
*/
void ICGASTConsumer::HandleTranslationUnit(clang::ASTContext &Ctx) {
tuv.TraverseDecl(Ctx.getTranslationUnitDecl());
}