This machine mirrors various open-source projects.
20 Gbit/s uplink.
If there are any issues or you want another project mirrored, please contact
mirror-service -=AT=- netcologne DOT de !
#include <SubroutineRef.h>
Classes | |
class | SubroutineDeclIter |
Public Member Functions | |
SubroutineRef (Location loc, SubroutineDecl *decl) | |
Creates a SubroutineRef representing the given declaration. | |
SubroutineRef (Location loc, SubroutineDecl **decls, unsigned numDecls) | |
template<class I > | |
SubroutineRef (Location loc, I begin, I end) | |
IdentifierInfo * | getIdInfo () const |
Returns the IdentifierInfo common to all of the referenced declarations. | |
const char * | getString () const |
Returns a C-string representing the name common to all overloads. | |
Location | getLocation () const |
Returns the location of this reference. | |
void | addDeclaration (SubroutineDecl *srDecl) |
Extends this reference with another declaration. | |
template<class Iter > | |
void | addDeclarations (Iter I, Iter E) |
bool | isOverloaded () const |
Returns true if this references more than one declaration. | |
bool | empty () const |
Returns true if this reference is empty. | |
bool | referencesFunctions () const |
Returns true if this is a reference to a set of function declarations. | |
bool | referencesProcedures () const |
Returns true if this is a reference to a set of procedure declarations. | |
unsigned | numDeclarations () const |
Returns the number of declarations associated with this reference. | |
bool | contains (const SubroutineDecl *srDecl) const |
bool | contains (const SubroutineType *srType) const |
bool | keepSubroutinesWithArity (unsigned arity) |
void | resolve (SubroutineDecl *srDecl) |
bool | isResolved () const |
Returns true if this is a resolved reference. | |
Erase Methods. | |
iterator | erase (iterator I) |
template<class T > | |
SubroutineDeclIter< T > | erase (SubroutineDeclIter< T > SDI) |
Static Public Member Functions | |
static bool | classof (const SubroutineRef *node) |
Support isa and dyn_cast. | |
static bool | classof (const Ast *node) |
| |
typedef DeclVector::iterator | iterator |
Iterators over the referenced declarations. | |
typedef DeclVector::const_iterator | const_iterator |
Iterators over the referenced declarations. | |
typedef SubroutineDeclIter < FunctionDecl > | fun_iterator |
typedef const SubroutineDeclIter < FunctionDecl > | const_fun_iterator |
Iterators over the referenced declarations. | |
typedef SubroutineDeclIter < ProcedureDecl > | proc_iterator |
Iterators over the referenced declarations. | |
typedef const SubroutineDeclIter < ProcedureDecl > | const_proc_iterator |
Iterators over the referenced declarations. | |
const SubroutineDecl * | getDeclaration (unsigned i) const |
Returns the i'th delaration associated with this reference. | |
SubroutineDecl * | getDeclaration (unsigned i) |
Iterators over the referenced declarations. | |
const SubroutineDecl * | getDeclaration () const |
SubroutineDecl * | getDeclaration () |
Iterators over the referenced declarations. | |
iterator | begin () |
Iterators over the referenced declarations. | |
iterator | end () |
Iterators over the referenced declarations. | |
const_iterator | begin () const |
Iterators over the referenced declarations. | |
const_iterator | end () const |
Iterators over the referenced declarations. | |
fun_iterator | begin_functions () |
Iterators over the referenced declarations. | |
fun_iterator | end_functions () |
Iterators over the referenced declarations. | |
const_fun_iterator | begin_functions () const |
Iterators over the referenced declarations. | |
const_fun_iterator | end_functions () const |
Iterators over the referenced declarations. | |
proc_iterator | begin_procedures () |
Iterators over the referenced declarations. | |
proc_iterator | end_procedures () |
Iterators over the referenced declarations. | |
const_proc_iterator | begin_procedures () const |
Iterators over the referenced declarations. | |
const_proc_iterator | end_procedures () const |
Iterators over the referenced declarations. |
This class represents a reference to a subroutine name. It provides location information as to where the reference occurs in source code. It also provides a set of declaration nodes representing a overloaded family of declarations.
Note that this class is a miscellaneous member of the AST in that it does not belong to one of the major branches (Type, Decl, Expr).
Definition at line 29 of file SubroutineRef.h.
typedef const SubroutineDeclIter<FunctionDecl> comma::SubroutineRef::const_fun_iterator |
Iterators over the referenced declarations.
Definition at line 244 of file SubroutineRef.h.
typedef DeclVector::const_iterator comma::SubroutineRef::const_iterator |
Iterators over the referenced declarations.
Definition at line 167 of file SubroutineRef.h.
typedef const SubroutineDeclIter<ProcedureDecl> comma::SubroutineRef::const_proc_iterator |
Iterators over the referenced declarations.
Definition at line 268 of file SubroutineRef.h.
typedef SubroutineDeclIter<FunctionDecl> comma::SubroutineRef::fun_iterator |
Specialized iterators to traverse the set of functions or procedures. Note that any given SubroutineRef only holds functions or procedures and never a mix of the two. The iterators will always be empty if the iterator type does not match the kind of subroutines this reference contains.
Definition at line 233 of file SubroutineRef.h.
typedef DeclVector::iterator comma::SubroutineRef::iterator |
Iterators over the referenced declarations.
Definition at line 163 of file SubroutineRef.h.
typedef SubroutineDeclIter<ProcedureDecl> comma::SubroutineRef::proc_iterator |
Iterators over the referenced declarations.
Definition at line 257 of file SubroutineRef.h.
comma::SubroutineRef::SubroutineRef | ( | Location | loc, | |
SubroutineDecl * | decl | |||
) | [inline] |
Creates a SubroutineRef representing the given declaration.
Definition at line 39 of file SubroutineRef.h.
comma::SubroutineRef::SubroutineRef | ( | Location | loc, | |
SubroutineDecl ** | decls, | |||
unsigned | numDecls | |||
) | [inline] |
Creates a SubroutineRef given a set of SubroutineDecl's.
All subroutine decls provided must be either ProcedureDecl's or FunctionDecl's and be identically named.
Definition at line 48 of file SubroutineRef.h.
comma::SubroutineRef::SubroutineRef | ( | Location | loc, | |
I | begin, | |||
I | end | |||
) | [inline] |
Creates a SubroutineRef given an iterator pair over a set of SubroutineDecl's.
All subroutine decls provided must be either ProcedureDecl's or FunctionDecl's and be identically named.
Definition at line 60 of file SubroutineRef.h.
void SubroutineRef::addDeclaration | ( | SubroutineDecl * | srDecl | ) |
void comma::SubroutineRef::addDeclarations | ( | Iter | I, | |
Iter | E | |||
) | [inline] |
Extends this reference with the set of declarations given by a pair of iterators.
Definition at line 84 of file SubroutineRef.h.
const_iterator comma::SubroutineRef::begin | ( | ) | const [inline] |
Iterators over the referenced declarations.
Definition at line 168 of file SubroutineRef.h.
iterator comma::SubroutineRef::begin | ( | ) | [inline] |
Iterators over the referenced declarations.
Definition at line 164 of file SubroutineRef.h.
const_fun_iterator comma::SubroutineRef::begin_functions | ( | ) | const [inline] |
Iterators over the referenced declarations.
Definition at line 245 of file SubroutineRef.h.
fun_iterator comma::SubroutineRef::begin_functions | ( | ) | [inline] |
Iterators over the referenced declarations.
Definition at line 234 of file SubroutineRef.h.
const_proc_iterator comma::SubroutineRef::begin_procedures | ( | ) | const [inline] |
Iterators over the referenced declarations.
Definition at line 269 of file SubroutineRef.h.
proc_iterator comma::SubroutineRef::begin_procedures | ( | ) | [inline] |
Iterators over the referenced declarations.
Definition at line 258 of file SubroutineRef.h.
static bool comma::SubroutineRef::classof | ( | const Ast * | node | ) | [inline, static] |
Definition at line 300 of file SubroutineRef.h.
static bool comma::SubroutineRef::classof | ( | const SubroutineRef * | node | ) | [inline, static] |
Support isa and dyn_cast.
Reimplemented from comma::Ast.
Definition at line 299 of file SubroutineRef.h.
bool SubroutineRef::contains | ( | const SubroutineType * | srType | ) | const |
bool SubroutineRef::contains | ( | const SubroutineDecl * | srDecl | ) | const |
bool comma::SubroutineRef::empty | ( | ) | const [inline] |
Returns true if this reference is empty.
Definition at line 93 of file SubroutineRef.h.
const_iterator comma::SubroutineRef::end | ( | ) | const [inline] |
Iterators over the referenced declarations.
Definition at line 169 of file SubroutineRef.h.
iterator comma::SubroutineRef::end | ( | ) | [inline] |
Iterators over the referenced declarations.
Definition at line 165 of file SubroutineRef.h.
const_fun_iterator comma::SubroutineRef::end_functions | ( | ) | const [inline] |
Iterators over the referenced declarations.
Definition at line 252 of file SubroutineRef.h.
fun_iterator comma::SubroutineRef::end_functions | ( | ) | [inline] |
Iterators over the referenced declarations.
Definition at line 240 of file SubroutineRef.h.
const_proc_iterator comma::SubroutineRef::end_procedures | ( | ) | const [inline] |
Iterators over the referenced declarations.
Definition at line 276 of file SubroutineRef.h.
proc_iterator comma::SubroutineRef::end_procedures | ( | ) | [inline] |
Iterators over the referenced declarations.
Definition at line 264 of file SubroutineRef.h.
SubroutineDeclIter<T> comma::SubroutineRef::erase | ( | SubroutineDeclIter< T > | SDI | ) | [inline] |
Definition at line 292 of file SubroutineRef.h.
Definition at line 289 of file SubroutineRef.h.
SubroutineDecl* comma::SubroutineRef::getDeclaration | ( | ) | [inline] |
Iterators over the referenced declarations.
Definition at line 128 of file SubroutineRef.h.
const SubroutineDecl* comma::SubroutineRef::getDeclaration | ( | ) | const [inline] |
If this is a resolved reference, return the unique declaration it names. Otherwise, return null.
Definition at line 124 of file SubroutineRef.h.
SubroutineDecl* comma::SubroutineRef::getDeclaration | ( | unsigned | i | ) | [inline] |
Iterators over the referenced declarations.
Definition at line 115 of file SubroutineRef.h.
const SubroutineDecl* comma::SubroutineRef::getDeclaration | ( | unsigned | i | ) | const [inline] |
Returns the i'th delaration associated with this reference.
Definition at line 110 of file SubroutineRef.h.
IdentifierInfo* comma::SubroutineRef::getIdInfo | ( | ) | const [inline] |
Returns the IdentifierInfo common to all of the referenced declarations.
Definition at line 67 of file SubroutineRef.h.
Location comma::SubroutineRef::getLocation | ( | ) | const [inline, virtual] |
Returns the location of this reference.
Reimplemented from comma::Ast.
Definition at line 76 of file SubroutineRef.h.
const char* comma::SubroutineRef::getString | ( | ) | const [inline] |
Returns a C-string representing the name common to all overloads.
Definition at line 73 of file SubroutineRef.h.
bool comma::SubroutineRef::isOverloaded | ( | ) | const [inline] |
Returns true if this references more than one declaration.
Definition at line 90 of file SubroutineRef.h.
bool comma::SubroutineRef::isResolved | ( | ) | const [inline] |
Returns true if this is a resolved reference.
Definition at line 159 of file SubroutineRef.h.
bool SubroutineRef::keepSubroutinesWithArity | ( | unsigned | arity | ) |
unsigned comma::SubroutineRef::numDeclarations | ( | ) | const [inline] |
Returns the number of declarations associated with this reference.
Definition at line 106 of file SubroutineRef.h.
bool comma::SubroutineRef::referencesFunctions | ( | ) | const [inline] |
Returns true if this is a reference to a set of function declarations.
Definition at line 96 of file SubroutineRef.h.
bool comma::SubroutineRef::referencesProcedures | ( | ) | const [inline] |
Returns true if this is a reference to a set of procedure declarations.
Definition at line 101 of file SubroutineRef.h.
void comma::SubroutineRef::resolve | ( | SubroutineDecl * | srDecl | ) | [inline] |
Resolves this reference to point at the given declaration.
This method removes all declarations from the reference, then adds in the given declaration. This method is used once overloads have been resolved.
Definition at line 153 of file SubroutineRef.h.