MLIR
20.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. More... | |
DeclScope * | getParentScope () |
Return the parent scope of this scope, or nullptr if there is no parent. More... | |
const DeclScope * | getParentScope () const |
auto | getDecls () const |
Return all of the decls within this scope. More... | |
void | add (Decl *decl) |
Add a new decl to the scope. More... | |
Decl * | lookup (StringRef name) |
Lookup a decl with the given name starting from this scope. More... | |
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.
|
inline |
void DeclScope::add | ( | Decl * | decl | ) |
Add a new decl to the scope.
Definition at line 175 of file Nodes.cpp.
References mlir::pdll::ast::Name::getName(), and mlir::pdll::ast::Decl::getName().
|
inline |
|
inline |
|
inline |
Decl * DeclScope::lookup | ( | StringRef | name | ) |
|
inline |
|
inline |
|
inline |