|
MLIR 22.0.0git
|
This class represents a scope for named AST decls. More...
#include "mlir/Tools/PDLL/AST/Nodes.h"
Public Member Functions | |
| DeclScope (DeclScope *parent=nullptr) | |
| Create a new scope with an optional parent scope. | |
| DeclScope * | getParentScope () |
| Return the parent scope of this scope, or nullptr if there is no parent. | |
| const DeclScope * | getParentScope () const |
| auto | getDecls () const |
| Return all of the decls within this scope. | |
| void | add (Decl *decl) |
| Add a new decl to the scope. | |
| Decl * | lookup (StringRef name) |
| Lookup a decl with the given name starting from this scope. | |
| template<typename T> | |
| T * | lookup (StringRef name) |
| const Decl * | lookup (StringRef name) const |
| template<typename T> | |
| const T * | lookup (StringRef name) const |
This class represents a scope for named AST decls.
A scope determines the visibility and lifetime of a named declaration.
Create a new scope with an optional parent scope.
Definition at line 67 of file Nodes.h.
References DeclScope().
Referenced by DeclScope(), getParentScope(), getParentScope(), and lookup().
Add a new decl to the scope.
Definition at line 175 of file Nodes.cpp.
References mlir::pdll::ast::Decl::getName(), and mlir::pdll::ast::Name::getName().
|
inline |
|
inline |
Return the parent scope of this scope, or nullptr if there is no parent.
Definition at line 70 of file Nodes.h.
References DeclScope().
|
inline |
Definition at line 71 of file Nodes.h.
References DeclScope().
| Decl * DeclScope::lookup | ( | StringRef | name | ) |
|
inline |
|
inline |
Definition at line 86 of file Nodes.h.
References DeclScope(), and lookup().
|
inline |