10 clang::ASTContext &ctx)
14 is_entry_function_{false},
16 entry_cxx_record_decl_{nullptr},
17 entry_method_decl_{nullptr},
18 found_entry_decl_{false},
19 constructor_stmt_{nullptr},
22 process_me_{nullptr} {
28 TraverseDecl(
const_cast<clang::CXXRecordDecl *
>(
_d));
42 TraverseDecl(
const_cast<clang::CXXRecordDecl *
>(
_d));
60 std::string memberName = e->getMemberDecl()->getNameAsString();
65 if (memberName ==
"create_method_process") {
68 }
else if (memberName ==
"create_thread_process") {
71 }
else if (memberName ==
"create_cthread_process") {
93 LLVM_DEBUG(llvm::dbgs() <<
"********** 5. RESET Matcher ***********\n";);
100 MatchFinder resetMatchRegistry{};
103 reset_matcher.dump();
140 if (CXXConstructorDecl * cd{dyn_cast<CXXConstructorDecl>(md)}) {
142 const FunctionDecl *fd{
nullptr};
187 os_ <<
"\n ============== FindEntryFunction ===============\n";
188 os_ <<
"\n:> Print Entry Function informtion for : " <<
_d->getNameAsString()
193 os_ <<
"\n:> Entry function name: " <<
ef->
getName() <<
", process type: ";
196 os_ <<
" SC_THREAD\n";
199 os_ <<
" SC_METHOD\n";
202 os_ <<
" SC_CTHREAD\n";
211 os_ <<
"\n ============== END FindEntryFunction ===============\n";
void registerMatchers(MatchFinder &finder, clang::MemberExpr *process_expr)
clang::CXXMethodDecl * getEntryMethod()
void setName(std::string)
PROCESS_TYPE getProcessType()
void addResetEdge(std::pair< std::string, const clang::Expr * > reset_edge)
void addResetSignal(std::pair< std::string, const clang::Expr * > reset_signal)
void setProcessType(PROCESS_TYPE)
void addResetType(bool reset_type)
CXXRecordDecl * entry_cxx_record_decl_
virtual bool VisitCXXMethodDecl(CXXMethodDecl *d)
virtual bool VisitStringLiteral(StringLiteral *l)
Virtual methods from RecursiveASTVisitor.
EntryFunctionContainer * ef
clang::MemberExpr * process_me_
vector< CXXMethodDecl * > other_function_list_
entryFunctionVectorType entry_function_list_
vector< CXXMethodDecl * > getOtherFunctions()
CXXMethodDecl * entry_method_decl_
clang::ASTContext & context_
FindEntryFunctions(const clang::CXXRecordDecl *d, llvm::raw_ostream &os, clang::ASTContext &ctx)
virtual bool VisitMemberExpr(MemberExpr *e)
CXXMethodDecl * getEntryMethodDecl()
std::vector< EntryFunctionContainer * > entryFunctionVectorType
Typedefs.
CXXRecordDecl * getEntryCXXRecordDecl()
bool shouldVisitTemplateInstantiations() const
virtual ~FindEntryFunctions()
clang::CXXConstructorDecl * ctor_decl_
entryFunctionVectorType * getEntryFunctions()