MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::pdll::ast::Name Struct Reference

This class provides a convenient API for interacting with source names. More...

#include "mlir/Tools/PDLL/AST/Nodes.h"

Public Member Functions

StringRef getName () const
 Return the raw string name. More...
 
SMRange getLoc () const
 Get the location of this name. More...
 

Static Public Member Functions

static const Namecreate (Context &ctx, StringRef name, SMRange location)
 

Detailed Description

This class provides a convenient API for interacting with source names.

It contains a string name as well as the source location for that name.

Definition at line 37 of file Nodes.h.

Member Function Documentation

◆ create()

const Name & Name::create ( Context ctx,
StringRef  name,
SMRange  location 
)
static

Definition at line 33 of file Nodes.cpp.

References copyStringWithNull(), and mlir::pdll::ast::Context::getAllocator().

◆ getLoc()

SMRange mlir::pdll::ast::Name::getLoc ( ) const
inline

Get the location of this name.

Definition at line 44 of file Nodes.h.

◆ getName()

StringRef mlir::pdll::ast::Name::getName ( ) const
inline

Return the raw string name.

Definition at line 41 of file Nodes.h.

Referenced by mlir::pdll::ast::DeclScope::add(), mlir::pdll::ast::OpNameDecl::getName(), and shouldAddHintFor().


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