MLIR  20.0.0git
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
mlir::tblgen::FmtReplacement Struct Reference

Struct representing a replacement segment for the formatted string. More...

#include "mlir/TableGen/Format.h"

Public Types

enum class  Type {
  Empty , Literal , PositionalPH , PositionalRangePH ,
  SpecialPH
}
 

Public Member Functions

 FmtReplacement ()=default
 
 FmtReplacement (StringRef literal)
 
 FmtReplacement (StringRef spec, size_t index)
 
 FmtReplacement (StringRef spec, size_t index, size_t end)
 
 FmtReplacement (StringRef spec, FmtContext::PHKind placeholder)
 

Public Attributes

Type type = Type::Empty
 
StringRef spec
 
size_t index = 0
 
size_t end = kUnset
 
FmtContext::PHKind placeholder = FmtContext::PHKind::None
 

Static Public Attributes

static constexpr size_t kUnset = -1
 

Detailed Description

Struct representing a replacement segment for the formatted string.

It can be a segment of the formatting template (for Literal) or a replacement parameter (for PositionalPH, PositionalRangePH and SpecialPH).

Definition at line 93 of file Format.h.

Member Enumeration Documentation

◆ Type

Enumerator
Empty 
Literal 
PositionalPH 
PositionalRangePH 
SpecialPH 

Definition at line 94 of file Format.h.

Constructor & Destructor Documentation

◆ FmtReplacement() [1/5]

mlir::tblgen::FmtReplacement::FmtReplacement ( )
default

◆ FmtReplacement() [2/5]

mlir::tblgen::FmtReplacement::FmtReplacement ( StringRef  literal)
inlineexplicit

Definition at line 103 of file Format.h.

◆ FmtReplacement() [3/5]

mlir::tblgen::FmtReplacement::FmtReplacement ( StringRef  spec,
size_t  index 
)
inline

Definition at line 105 of file Format.h.

◆ FmtReplacement() [4/5]

mlir::tblgen::FmtReplacement::FmtReplacement ( StringRef  spec,
size_t  index,
size_t  end 
)
inline

Definition at line 107 of file Format.h.

◆ FmtReplacement() [5/5]

mlir::tblgen::FmtReplacement::FmtReplacement ( StringRef  spec,
FmtContext::PHKind  placeholder 
)
inline

Definition at line 109 of file Format.h.

Member Data Documentation

◆ end

size_t mlir::tblgen::FmtReplacement::end = kUnset

Definition at line 115 of file Format.h.

Referenced by mlir::tblgen::FmtObjectBase::format().

◆ index

size_t mlir::tblgen::FmtReplacement::index = 0

Definition at line 114 of file Format.h.

Referenced by mlir::tblgen::FmtObjectBase::format().

◆ kUnset

constexpr size_t mlir::tblgen::FmtReplacement::kUnset = -1
staticconstexpr

Definition at line 118 of file Format.h.

Referenced by mlir::tblgen::FmtObjectBase::format().

◆ placeholder

FmtContext::PHKind mlir::tblgen::FmtReplacement::placeholder = FmtContext::PHKind::None

Definition at line 116 of file Format.h.

Referenced by mlir::tblgen::FmtObjectBase::format().

◆ spec

StringRef mlir::tblgen::FmtReplacement::spec

Definition at line 113 of file Format.h.

Referenced by mlir::tblgen::FmtObjectBase::format().

◆ type

Type mlir::tblgen::FmtReplacement::type = Type::Empty

Definition at line 112 of file Format.h.

Referenced by mlir::tblgen::FmtObjectBase::format().


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