comma::FunctionDecl Class Reference

#include <Decl.h>

Inheritance diagram for comma::FunctionDecl:
Inheritance graph
[legend]
Collaboration diagram for comma::FunctionDecl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FunctionDecl (AstResource &resource, IdentifierInfo *name, Location loc, ParamValueDecl **params, unsigned numParams, Type *returnType, DeclRegion *parent)
 FunctionDecl (IdentifierInfo *name, Location loc, IdentifierInfo **keywords, FunctionType *type, DeclRegion *parent)
FunctionDeclgetDefiningDeclaration ()
const FunctionDeclgetDefiningDeclaration () const
FunctionDeclgetForwardDeclaration ()
const FunctionDeclgetForwardDeclaration () const



const FunctionTypegetType () const
 Returns the type of this function declaration.
FunctionTypegetType ()
 Returns the type of this function declaration.
const TypegetReturnType () const
 Provides the return type of this function.
TypegetReturnType ()
 Returns the type of this function declaration.

Static Public Member Functions

static bool classof (const FunctionDecl *node)
 Support isa and dyn_cast.
static bool classof (const Ast *node)

Protected Member Functions

 FunctionDecl (AstKind kind, AstResource &resource, IdentifierInfo *name, Location loc, EnumerationType *returnType, DeclRegion *parent)
 FunctionDecl (AstKind kind, IdentifierInfo *name, Location loc, IdentifierInfo **keywords, FunctionType *type, DeclRegion *parent)

Detailed Description

Definition at line 1137 of file Decl.h.


Constructor & Destructor Documentation

FunctionDecl::FunctionDecl ( AstResource resource,
IdentifierInfo name,
Location  loc,
ParamValueDecl **  params,
unsigned  numParams,
Type returnType,
DeclRegion parent 
)

Definition at line 572 of file Decl.cpp.

comma::FunctionDecl::FunctionDecl ( IdentifierInfo name,
Location  loc,
IdentifierInfo **  keywords,
FunctionType type,
DeclRegion parent 
) [inline]

Constructs a FunctionDecl given a FunctionType and set of keywords.

This constructor is most useful for generating implicit declarations, typically using a rewritten type. ParamValue decls are generated using the supplied array of keywords (which must be long enough to match the arity of the supplied type, or 0 if this is a nullary function). The resulting parameter decls all have default modes, and so one must set each by hand if need be afterwords.

Definition at line 1153 of file Decl.h.

FunctionDecl::FunctionDecl ( AstKind  kind,
AstResource resource,
IdentifierInfo name,
Location  loc,
EnumerationType returnType,
DeclRegion parent 
) [protected]

Definition at line 582 of file Decl.cpp.

comma::FunctionDecl::FunctionDecl ( AstKind  kind,
IdentifierInfo name,
Location  loc,
IdentifierInfo **  keywords,
FunctionType type,
DeclRegion parent 
) [inline, protected]

Definition at line 1204 of file Decl.h.


Member Function Documentation

static bool comma::FunctionDecl::classof ( const Ast node  )  [inline, static]

Reimplemented from comma::SubroutineDecl.

Reimplemented in comma::FunctionAttribDecl, comma::PosAD, comma::ValAD, and comma::EnumLiteral.

Definition at line 1195 of file Decl.h.

static bool comma::FunctionDecl::classof ( const FunctionDecl node  )  [inline, static]

Support isa and dyn_cast.

Reimplemented from comma::SubroutineDecl.

Reimplemented in comma::FunctionAttribDecl, comma::PosAD, comma::ValAD, and comma::EnumLiteral.

Definition at line 1194 of file Decl.h.

const FunctionDecl* comma::FunctionDecl::getDefiningDeclaration (  )  const [inline]

Reimplemented from comma::SubroutineDecl.

Definition at line 1170 of file Decl.h.

FunctionDecl* comma::FunctionDecl::getDefiningDeclaration (  )  [inline]

Reimplemented from comma::SubroutineDecl.

Definition at line 1165 of file Decl.h.

const FunctionDecl* comma::FunctionDecl::getForwardDeclaration (  )  const [inline]

Reimplemented from comma::SubroutineDecl.

Definition at line 1181 of file Decl.h.

FunctionDecl* comma::FunctionDecl::getForwardDeclaration (  )  [inline]

Reimplemented from comma::SubroutineDecl.

Definition at line 1176 of file Decl.h.

Type* comma::FunctionDecl::getReturnType (  )  [inline]

Returns the type of this function declaration.

Reimplemented in comma::EnumLiteral.

Definition at line 1190 of file Decl.h.

const Type* comma::FunctionDecl::getReturnType (  )  const [inline]

Provides the return type of this function.

Reimplemented in comma::EnumLiteral.

Definition at line 1189 of file Decl.h.

FunctionType* comma::FunctionDecl::getType (  )  [inline, virtual]

Returns the type of this function declaration.

Implements comma::SubroutineDecl.

Definition at line 1162 of file Decl.h.

const FunctionType* comma::FunctionDecl::getType (  )  const [inline, virtual]

Returns the type of this function declaration.

Implements comma::SubroutineDecl.

Definition at line 1161 of file Decl.h.


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

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1