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

#include <FindSCMain.h>

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

Public Member Functions

 FindSCMain (clang::TranslationUnitDecl *, llvm::raw_ostream &)
 
virtual ~FindSCMain ()
 
virtual bool VisitFunctionDecl (clang::FunctionDecl *decl)
 
clang::FunctionDecl * getSCMainFunctionDecl () const
 
bool isSCMainFound () const
 

Private Attributes

llvm::raw_ostream & os_
 
clang::FunctionDecl * sc_main_function_declaration_
 

Detailed Description

Definition at line 14 of file FindSCMain.h.

Constructor & Destructor Documentation

◆ FindSCMain()

FindSCMain::FindSCMain ( clang::TranslationUnitDecl * tuDecl,
llvm::raw_ostream & os )

Definition at line 7 of file FindSCMain.cpp.

◆ ~FindSCMain()

FindSCMain::~FindSCMain ( )
virtual

Definition at line 14 of file FindSCMain.cpp.

Member Function Documentation

◆ getSCMainFunctionDecl()

clang::FunctionDecl * FindSCMain::getSCMainFunctionDecl ( ) const

Definition at line 32 of file FindSCMain.cpp.

◆ isSCMainFound()

bool FindSCMain::isSCMainFound ( ) const

Definition at line 38 of file FindSCMain.cpp.

◆ VisitFunctionDecl()

bool FindSCMain::VisitFunctionDecl ( clang::FunctionDecl * decl)
virtual

Find sc_main. There are three conditions to satisfy this:

  1. Must have sc_main in its name.
  2. Must have a body
  3. Must not be a first declaration. (This is becuase systemc.h includes a null definition of sc_main.

Definition at line 16 of file FindSCMain.cpp.

Member Data Documentation

◆ os_

llvm::raw_ostream& systemc_clang::FindSCMain::os_
private

Definition at line 24 of file FindSCMain.h.

◆ sc_main_function_declaration_

clang::FunctionDecl* systemc_clang::FindSCMain::sc_main_function_declaration_
private

Definition at line 25 of file FindSCMain.h.


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