MLIR 22.0.0git
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.
SMRange getLoc () const
 Get the location of this name.

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(), and shouldAddHintFor().


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