15#ifndef _SYSTEMC_CLANG_H_
16#define _SYSTEMC_CLANG_H_
18#include "clang/AST/ASTConsumer.h"
19#include "clang/AST/RecursiveASTVisitor.h"
20#include "clang/Basic/SourceManager.h"
21#include "clang/Frontend/CompilerInstance.h"
22#include "clang/Frontend/FrontendPluginRegistry.h"
23#include "clang/Tooling/CommonOptionsParser.h"
24#include "clang/Tooling/Tooling.h"
35using namespace clang::tooling;
47 public RecursiveASTVisitor<SystemCConsumer> {
50 llvm::raw_ostream &
os_;
77 clang::SourceManager &
sm_;
Class ModuleDeclarationMatcher.
SystemCClang(clang::CompilerInstance &ci, const std::string &top)
This is the main consumer class that beings the parsing of SystemC.
const std::string & getTopModule() const
clang::SourceManager & sm_
clang::SourceManager & getSourceManager() const
clang::ASTContext & context_
SystemCConsumer(clang::CompilerInstance &, std::string top="!none")
virtual ~SystemCConsumer()
virtual void HandleTranslationUnit(clang::ASTContext &context)
void setTopModule(const std::string &top_module_decl)
void processNetlist(FindSCMain *scmain, ModuleDeclarationMatcher *module_declaration_handler)
clang::ASTContext & getContext() const
Model * getSystemCModel()