systemc-clang 2.0.0
Parsing SystemC constructs
|
Class ModuleDeclarationMatcher. More...
#include <Matchers.h>
Public Types | |
typedef std::vector< InstanceMatcher::InstanceDeclType > | InstanceListType |
typedef std::pair< clang::CXXRecordDecl *, ModuleInstance * > | ModulePairType |
This will store all the modules as ModuleDecl. | |
typedef std::multimap< clang::CXXRecordDecl *, ModuleInstance * > | ModuleMapType |
Public Member Functions | |
const InstanceMatcher & | getInstanceMatcher () |
void | registerMatchers (MatchFinder &finder) |
Register the matchers. | |
virtual void | run (const MatchFinder::MatchResult &result) |
const ModuleMapType & | getFoundModuleDeclarations () const |
void | runPortMatcher (ASTContext &context, const clang::CXXRecordDecl *decl, ModuleInstance *add_module) |
void | runModuleDeclarationMatchers (ASTContext &context, clang::CXXRecordDecl *cxx_decl, ModuleInstance *add_module_decl) |
void | matchInstancesInBaseClasses (ASTContext &context) |
void | processInstanceCXXDecls (ASTContext &context) |
void | dump () |
Private Attributes | |
ModuleMapType | modules_ |
InstanceMatcher | instance_matcher_ |
Class ModuleDeclarationMatcher.
Definition at line 40 of file Matchers.h.
std::vector<InstanceMatcher::InstanceDeclType> sc_ast_matchers::ModuleDeclarationMatcher::InstanceListType |
Definition at line 42 of file Matchers.h.
std::multimap<clang::CXXRecordDecl *, ModuleInstance *> sc_ast_matchers::ModuleDeclarationMatcher::ModuleMapType |
Definition at line 46 of file Matchers.h.
std::pair<clang::CXXRecordDecl *, ModuleInstance *> sc_ast_matchers::ModuleDeclarationMatcher::ModulePairType |
This will store all the modules as ModuleDecl.
Definition at line 45 of file Matchers.h.
|
inline |
Definition at line 270 of file Matchers.h.
|
inline |
Definition at line 68 of file Matchers.h.
|
inline |
Definition at line 58 of file Matchers.h.
|
inline |
Copy contents over.
Definition at line 158 of file Matchers.h.
|
inline |
Base classes may add instances. So we must get the updated instance_map.
DEBUG: output all the classes that have been identified. =======
END DEBUG ===========================================
Go through each identified instance, and identify any ports and module information.
TODO: Why do we need this when we can just access the instances and then get the decl?
Find if the instance CXXREcordDecl has a base class, and parse that too. Any ports, signals, etc. should be incorporated into the module instance.
Definition at line 190 of file Matchers.h.
|
inline |
Register the matchers.
Definition at line 61 of file Matchers.h.
|
inlinevirtual |
Definition at line 66 of file Matchers.h.
|
inline |
Add the sensitivity information to each of the entry functions.
Definition at line 95 of file Matchers.h.
|
inline |
Definition at line 70 of file Matchers.h.
|
private |
Definition at line 55 of file Matchers.h.
|
private |
This will store the module instances as pair of CXXRecordDecl*, ModuleInstance*. The CXXRecordDecl* is the type of the sc_module, and ModuleInstance holds additional parsed information.
Definition at line 52 of file Matchers.h.