#include <Decl.h>


Public Member Functions | |
| virtual | ~SubroutineDecl () |
| unsigned | getArity () const |
| Returns the number of parameters this subroutine accepts. | |
| ParamValueDecl * | getParam (unsigned i) |
| Returns the i'th parameters declaration node. | |
| const ParamValueDecl * | getParam (unsigned i) const |
| Returns the i'th parameters declaration node. | |
| Type * | getParamType (unsigned i) const |
| Returns the type of the i'th parameter. | |
| PM::ParameterMode | getParamMode (unsigned i) const |
| PM::ParameterMode | getExplicitParamMode (unsigned i) const |
| Returns the i'th parameter mode for this type. | |
| IdentifierInfo * | getParamKeyword (unsigned i) const |
| Returns the i'th argument keyword. | |
| int | getKeywordIndex (IdentifierInfo *key) const |
| int | getKeywordIndex (KeywordSelector *key) const |
| bool | keywordsMatch (const SubroutineDecl *SRDecl) const |
| bool | paramModesMatch (const SubroutineDecl *SRDecl) const |
| void | setDefiningDeclaration (SubroutineDecl *routineDecl) |
| bool | hasDefiningDeclaration () const |
| SubroutineDecl * | getDefiningDeclaration () |
| const SubroutineDecl * | getDefiningDeclaration () const |
| SubroutineDecl * | getForwardDeclaration () |
| const SubroutineDecl * | getForwardDeclaration () const |
| const bool | hasForwardDeclaration () const |
| const bool | isForwardDeclaration () const |
| bool | hasBody () const |
| void | setBody (BlockStmt *block) |
| BlockStmt * | getBody () |
| const BlockStmt * | getBody () const |
| bool | isPrimitive () const |
| Returns true if this subroutine represents a primitive operation. | |
| void | setAsPrimitive (PO::PrimitiveID ID) |
| Marks this declaration as primitive. | |
| PO::PrimitiveID | getPrimitiveID () const |
| Returns the PrimitiveID of this subroutine. | |
| void | attachPragma (Pragma *P) |
| const Pragma * | findPragma (pragma::PragmaID ID) const |
| Returns the first pragma attached to this declaration with the given ID. | |
| bool | hasPragma (pragma::PragmaID ID) const |
Static Public Member Functions | |
| static bool | classof (const SubroutineDecl *node) |
| Support isa and dyn_cast. | |
| static bool | classof (const Ast *node) |
Protected Types | |
| enum | DeclLinkTag { FORWARD_TAG, DEFINITION_TAG } |
Enumeration used to tag the declaration link. More... | |
Protected Member Functions | |
| SubroutineDecl (AstKind kind, IdentifierInfo *name, Location loc, ParamValueDecl **params, unsigned numParams, DeclRegion *parent) | |
| SubroutineDecl (AstKind kind, IdentifierInfo *name, Location loc, IdentifierInfo **keywords, SubroutineType *type, DeclRegion *parent) | |
| SubroutineDecl (AstKind kind, IdentifierInfo *name, Location loc, DeclRegion *parent) | |
Protected Attributes | |
| PO::PrimitiveID | opID: 8 |
| Identifies the type of operation. | |
| unsigned | numParameters |
| ParamValueDecl ** | parameters |
| BlockStmt * | body |
| llvm::PointerIntPair < SubroutineDecl *, 1, DeclLinkTag > | declarationLink |
| llvm::iplist< Pragma > | pragmas |
Parameter Iterators | |
|
| |
| typedef ParamValueDecl ** | param_iterator |
| typedef ParamValueDecl *const * | const_param_iterator |
| param_iterator | begin_params () |
| param_iterator | end_params () |
| const_param_iterator | begin_params () const |
| const_param_iterator | end_params () const |
|
| |
| typedef llvm::iplist< Pragma > ::iterator | pragma_iterator |
| Iterators over the attached set of pragmas. | |
| typedef llvm::iplist< Pragma > ::const_iterator | const_pragma_iterator |
| Iterators over the attached set of pragmas. | |
| virtual SubroutineType * | getType ()=0 |
| Returns the type of this declaration. | |
| virtual const SubroutineType * | getType () const =0 |
| Iterators over the attached set of pragmas. | |
| SubroutineDecl * | getOrigin () |
| Specialization of Decl::getOrigin(). | |
| const SubroutineDecl * | getOrigin () const |
| Iterators over the attached set of pragmas. | |
| SubroutineDecl * | resolveOrigin () |
| Specialization of Decl::resolveOrigin(). | |
| const SubroutineDecl * | resolveOrigin () const |
| Iterators over the attached set of pragmas. | |
| pragma_iterator | begin_pragmas () |
| Iterators over the attached set of pragmas. | |
| pragma_iterator | end_pragmas () |
| Iterators over the attached set of pragmas. | |
| const_pragma_iterator | begin_pragmas () const |
| Iterators over the attached set of pragmas. | |
| const_pragma_iterator | end_pragmas () const |
| Iterators over the attached set of pragmas. | |
Definition at line 855 of file Decl.h.
| typedef ParamValueDecl* const* comma::SubroutineDecl::const_param_iterator |
| typedef llvm::iplist<Pragma>::const_iterator comma::SubroutineDecl::const_pragma_iterator |
| typedef llvm::iplist<Pragma>::iterator comma::SubroutineDecl::pragma_iterator |
enum comma::SubroutineDecl::DeclLinkTag [protected] |
| SubroutineDecl::SubroutineDecl | ( | AstKind | kind, | |
| IdentifierInfo * | name, | |||
| Location | loc, | |||
| ParamValueDecl ** | params, | |||
| unsigned | numParams, | |||
| DeclRegion * | parent | |||
| ) | [protected] |
| SubroutineDecl::SubroutineDecl | ( | AstKind | kind, | |
| IdentifierInfo * | name, | |||
| Location | loc, | |||
| IdentifierInfo ** | keywords, | |||
| SubroutineType * | type, | |||
| DeclRegion * | parent | |||
| ) | [protected] |
| SubroutineDecl::SubroutineDecl | ( | AstKind | kind, | |
| IdentifierInfo * | name, | |||
| Location | loc, | |||
| DeclRegion * | parent | |||
| ) | [protected] |
| void comma::SubroutineDecl::attachPragma | ( | Pragma * | P | ) | [inline] |
| const_param_iterator comma::SubroutineDecl::begin_params | ( | ) | const [inline] |
| param_iterator comma::SubroutineDecl::begin_params | ( | ) | [inline] |
| const_pragma_iterator comma::SubroutineDecl::begin_pragmas | ( | ) | const [inline] |
| pragma_iterator comma::SubroutineDecl::begin_pragmas | ( | ) | [inline] |
| static bool comma::SubroutineDecl::classof | ( | const Ast * | node | ) | [inline, static] |
Reimplemented from comma::Decl.
Reimplemented in comma::FunctionAttribDecl, comma::PosAD, comma::ValAD, comma::ProcedureDecl, comma::FunctionDecl, and comma::EnumLiteral.
| static bool comma::SubroutineDecl::classof | ( | const SubroutineDecl * | node | ) | [inline, static] |
Support isa and dyn_cast.
Reimplemented from comma::Decl.
Reimplemented in comma::FunctionAttribDecl, comma::PosAD, comma::ValAD, comma::ProcedureDecl, comma::FunctionDecl, and comma::EnumLiteral.
| const_param_iterator comma::SubroutineDecl::end_params | ( | ) | const [inline] |
| param_iterator comma::SubroutineDecl::end_params | ( | ) | [inline] |
| const_pragma_iterator comma::SubroutineDecl::end_pragmas | ( | ) | const [inline] |
| pragma_iterator comma::SubroutineDecl::end_pragmas | ( | ) | [inline] |
| const Pragma * SubroutineDecl::findPragma | ( | pragma::PragmaID | ID | ) | const |
| unsigned comma::SubroutineDecl::getArity | ( | ) | const [inline] |
| const BlockStmt* comma::SubroutineDecl::getBody | ( | ) | const [inline] |
| const SubroutineDecl* comma::SubroutineDecl::getDefiningDeclaration | ( | ) | const [inline] |
Reimplemented in comma::ProcedureDecl, and comma::FunctionDecl.
| SubroutineDecl* comma::SubroutineDecl::getDefiningDeclaration | ( | ) | [inline] |
Reimplemented in comma::ProcedureDecl, and comma::FunctionDecl.
| PM::ParameterMode comma::SubroutineDecl::getExplicitParamMode | ( | unsigned | i | ) | const [inline] |
| const SubroutineDecl* comma::SubroutineDecl::getForwardDeclaration | ( | ) | const [inline] |
Reimplemented in comma::ProcedureDecl, and comma::FunctionDecl.
| SubroutineDecl* comma::SubroutineDecl::getForwardDeclaration | ( | ) | [inline] |
Reimplemented in comma::ProcedureDecl, and comma::FunctionDecl.
| int SubroutineDecl::getKeywordIndex | ( | KeywordSelector * | key | ) | const |
If the KeywordSelector key names an argument keyword, return its associated index, else return -1.
| int SubroutineDecl::getKeywordIndex | ( | IdentifierInfo * | key | ) | const |
| const SubroutineDecl* comma::SubroutineDecl::getOrigin | ( | ) | const [inline] |
Iterators over the attached set of pragmas.
Reimplemented from comma::Decl.
| SubroutineDecl* comma::SubroutineDecl::getOrigin | ( | ) | [inline] |
Specialization of Decl::getOrigin().
Reimplemented from comma::Decl.
| const ParamValueDecl* comma::SubroutineDecl::getParam | ( | unsigned | i | ) | const [inline] |
| ParamValueDecl* comma::SubroutineDecl::getParam | ( | unsigned | i | ) | [inline] |
| IdentifierInfo* comma::SubroutineDecl::getParamKeyword | ( | unsigned | i | ) | const [inline] |
| PM::ParameterMode comma::SubroutineDecl::getParamMode | ( | unsigned | i | ) | const [inline] |
| Type* comma::SubroutineDecl::getParamType | ( | unsigned | i | ) | const [inline] |
| PO::PrimitiveID comma::SubroutineDecl::getPrimitiveID | ( | ) | const [inline] |
| virtual const SubroutineType* comma::SubroutineDecl::getType | ( | ) | const [pure virtual] |
Iterators over the attached set of pragmas.
Implemented in comma::ProcedureDecl, and comma::FunctionDecl.
| virtual SubroutineType* comma::SubroutineDecl::getType | ( | ) | [pure virtual] |
Returns the type of this declaration.
Implemented in comma::ProcedureDecl, and comma::FunctionDecl.
| bool comma::SubroutineDecl::hasDefiningDeclaration | ( | ) | const [inline] |
| const bool comma::SubroutineDecl::hasForwardDeclaration | ( | ) | const [inline] |
| bool comma::SubroutineDecl::hasPragma | ( | pragma::PragmaID | ID | ) | const [inline] |
| const bool comma::SubroutineDecl::isForwardDeclaration | ( | ) | const [inline] |
| bool comma::SubroutineDecl::isPrimitive | ( | ) | const [inline] |
| bool SubroutineDecl::keywordsMatch | ( | const SubroutineDecl * | SRDecl | ) | const |
| bool SubroutineDecl::paramModesMatch | ( | const SubroutineDecl * | SRDecl | ) | const |
| const SubroutineDecl* comma::SubroutineDecl::resolveOrigin | ( | ) | const [inline] |
Iterators over the attached set of pragmas.
Reimplemented from comma::Decl.
| SubroutineDecl* comma::SubroutineDecl::resolveOrigin | ( | ) | [inline] |
Specialization of Decl::resolveOrigin().
Reimplemented from comma::Decl.
| void comma::SubroutineDecl::setAsPrimitive | ( | PO::PrimitiveID | ID | ) | [inline] |
| void comma::SubroutineDecl::setBody | ( | BlockStmt * | block | ) | [inline] |
| void SubroutineDecl::setDefiningDeclaration | ( | SubroutineDecl * | routineDecl | ) |
BlockStmt* comma::SubroutineDecl::body [protected] |
llvm::PointerIntPair<SubroutineDecl*, 1, DeclLinkTag> comma::SubroutineDecl::declarationLink [protected] |
unsigned comma::SubroutineDecl::numParameters [protected] |
PO::PrimitiveID comma::SubroutineDecl::opID [protected] |
ParamValueDecl** comma::SubroutineDecl::parameters [protected] |
llvm::iplist<Pragma> comma::SubroutineDecl::pragmas [protected] |
1.6.1