systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
systemc_clang::FindEntryFunctions Class Reference

#include <FindEntryFunctions.h>

Inheritance diagram for systemc_clang::FindEntryFunctions:
Inheritance graph
[legend]
Collaboration diagram for systemc_clang::FindEntryFunctions:
Collaboration graph
[legend]

Public Types

typedef std::vector< EntryFunctionContainer * > entryFunctionVectorType
 Typedefs.
 
typedef std::pair< string, vector< string > > entryFunctionLHSPairType
 
typedef std::map< string, vector< string > > entryFunctionLHSMapType
 

Public Member Functions

 FindEntryFunctions (const clang::CXXRecordDecl *d, llvm::raw_ostream &os, clang::ASTContext &ctx)
 
virtual ~FindEntryFunctions ()
 
virtual bool VisitStringLiteral (StringLiteral *l)
 Virtual methods from RecursiveASTVisitor.
 
virtual bool VisitCXXMethodDecl (CXXMethodDecl *d)
 
virtual bool VisitMemberExpr (MemberExpr *e)
 
bool shouldVisitTemplateInstantiations () const
 
CXXRecordDecl * getEntryCXXRecordDecl ()
 
CXXMethodDecl * getEntryMethodDecl ()
 
string getEntryName ()
 
entryFunctionVectorTypegetEntryFunctions ()
 
vector< CXXMethodDecl * > getOtherFunctions ()
 
void dump ()
 

Private Member Functions

 FindEntryFunctions (llvm::raw_ostream &os)
 

Private Attributes

clang::ASTContext & context_
 
llvm::raw_ostream & os_
 
const CXXRecordDecl * _d
 
bool is_entry_function_
 
PROCESS_TYPE proc_type_
 
string entry_name_
 
CXXRecordDecl * entry_cxx_record_decl_
 
CXXMethodDecl * entry_method_decl_
 
bool found_entry_decl_
 
Stmt * constructor_stmt_
 
EntryFunctionContaineref
 
int pass_
 
clang::CXXConstructorDecl * ctor_decl_
 
entryFunctionVectorType entry_function_list_
 
entryFunctionLHSMapType entry_function_map_
 
vector< CXXMethodDecl * > other_function_list_
 
clang::MemberExpr * process_me_
 

Detailed Description

Definition at line 14 of file FindEntryFunctions.h.

Member Typedef Documentation

◆ entryFunctionLHSMapType

typedef std::map<string, vector<string> > systemc_clang::FindEntryFunctions::entryFunctionLHSMapType

Definition at line 20 of file FindEntryFunctions.h.

◆ entryFunctionLHSPairType

typedef std::pair<string, vector<string> > systemc_clang::FindEntryFunctions::entryFunctionLHSPairType

Definition at line 19 of file FindEntryFunctions.h.

◆ entryFunctionVectorType

Typedefs.

Definition at line 17 of file FindEntryFunctions.h.

Constructor & Destructor Documentation

◆ FindEntryFunctions() [1/2]

FindEntryFunctions::FindEntryFunctions ( const clang::CXXRecordDecl * d,
llvm::raw_ostream & os,
clang::ASTContext & ctx )

Pass_ 1: Find the constructor definition, and the Stmt* that has the code for it. Set the constructor_stmt_ pointer.

Reset logic.

Pass 2: Get the entry function name from constructor

Pass 3: Find the CXXMethodDecl* to the entry function

Definition at line 8 of file FindEntryFunctions.cpp.

◆ ~FindEntryFunctions()

FindEntryFunctions::~FindEntryFunctions ( )
virtual

Definition at line 46 of file FindEntryFunctions.cpp.

◆ FindEntryFunctions() [2/2]

systemc_clang::FindEntryFunctions::FindEntryFunctions ( llvm::raw_ostream & os)
private

Member Function Documentation

◆ dump()

void FindEntryFunctions::dump ( )

Definition at line 186 of file FindEntryFunctions.cpp.

◆ getEntryCXXRecordDecl()

CXXRecordDecl * FindEntryFunctions::getEntryCXXRecordDecl ( )

Definition at line 176 of file FindEntryFunctions.cpp.

◆ getEntryFunctions()

FindEntryFunctions::entryFunctionVectorType * FindEntryFunctions::getEntryFunctions ( )

Definition at line 216 of file FindEntryFunctions.cpp.

◆ getEntryMethodDecl()

CXXMethodDecl * FindEntryFunctions::getEntryMethodDecl ( )

Definition at line 181 of file FindEntryFunctions.cpp.

◆ getEntryName()

string FindEntryFunctions::getEntryName ( )

Definition at line 224 of file FindEntryFunctions.cpp.

◆ getOtherFunctions()

vector< CXXMethodDecl * > FindEntryFunctions::getOtherFunctions ( )

Definition at line 220 of file FindEntryFunctions.cpp.

◆ shouldVisitTemplateInstantiations()

bool FindEntryFunctions::shouldVisitTemplateInstantiations ( ) const

Definition at line 52 of file FindEntryFunctions.cpp.

◆ VisitCXXMethodDecl()

bool FindEntryFunctions::VisitCXXMethodDecl ( CXXMethodDecl * d)
virtual

Check if method is a constructor

Check if name is the same as _entryFunction.

Definition at line 132 of file FindEntryFunctions.cpp.

◆ VisitMemberExpr()

bool FindEntryFunctions::VisitMemberExpr ( MemberExpr * e)
virtual

Definition at line 56 of file FindEntryFunctions.cpp.

◆ VisitStringLiteral()

bool FindEntryFunctions::VisitStringLiteral ( StringLiteral * l)
virtual

Virtual methods from RecursiveASTVisitor.

FIXME: Where do we erase these? Create the object to handle multiple entry functions.

Definition at line 83 of file FindEntryFunctions.cpp.

Member Data Documentation

◆ _d

const CXXRecordDecl* systemc_clang::FindEntryFunctions::_d
private

Definition at line 43 of file FindEntryFunctions.h.

◆ constructor_stmt_

Stmt* systemc_clang::FindEntryFunctions::constructor_stmt_
private

Definition at line 50 of file FindEntryFunctions.h.

◆ context_

clang::ASTContext& systemc_clang::FindEntryFunctions::context_
private

Definition at line 41 of file FindEntryFunctions.h.

◆ ctor_decl_

clang::CXXConstructorDecl* systemc_clang::FindEntryFunctions::ctor_decl_
private

Definition at line 53 of file FindEntryFunctions.h.

◆ ef

EntryFunctionContainer* systemc_clang::FindEntryFunctions::ef
private

Definition at line 51 of file FindEntryFunctions.h.

◆ entry_cxx_record_decl_

CXXRecordDecl* systemc_clang::FindEntryFunctions::entry_cxx_record_decl_
private

Definition at line 47 of file FindEntryFunctions.h.

◆ entry_function_list_

entryFunctionVectorType systemc_clang::FindEntryFunctions::entry_function_list_
private

Definition at line 54 of file FindEntryFunctions.h.

◆ entry_function_map_

entryFunctionLHSMapType systemc_clang::FindEntryFunctions::entry_function_map_
private

Definition at line 55 of file FindEntryFunctions.h.

◆ entry_method_decl_

CXXMethodDecl* systemc_clang::FindEntryFunctions::entry_method_decl_
private

Definition at line 48 of file FindEntryFunctions.h.

◆ entry_name_

string systemc_clang::FindEntryFunctions::entry_name_
private

Definition at line 46 of file FindEntryFunctions.h.

◆ found_entry_decl_

bool systemc_clang::FindEntryFunctions::found_entry_decl_
private

Definition at line 49 of file FindEntryFunctions.h.

◆ is_entry_function_

bool systemc_clang::FindEntryFunctions::is_entry_function_
private

Definition at line 44 of file FindEntryFunctions.h.

◆ os_

llvm::raw_ostream& systemc_clang::FindEntryFunctions::os_
private

Definition at line 42 of file FindEntryFunctions.h.

◆ other_function_list_

vector<CXXMethodDecl *> systemc_clang::FindEntryFunctions::other_function_list_
private

Definition at line 56 of file FindEntryFunctions.h.

◆ pass_

int systemc_clang::FindEntryFunctions::pass_
private

Definition at line 52 of file FindEntryFunctions.h.

◆ proc_type_

PROCESS_TYPE systemc_clang::FindEntryFunctions::proc_type_
private

Definition at line 45 of file FindEntryFunctions.h.

◆ process_me_

clang::MemberExpr* systemc_clang::FindEntryFunctions::process_me_
private

Definition at line 57 of file FindEntryFunctions.h.


The documentation for this class was generated from the following files: