CIRCT  19.0.0git
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
circt::moore::PackedStructType Class Reference

A packed struct. More...

#include <MooreTypes.h>

Inheritance diagram for circt::moore::PackedStructType:
Inheritance graph
[legend]
Collaboration diagram for circt::moore::PackedStructType:
Collaboration graph
[legend]

Public Member Functions

Sign getSign () const
 Get the sign of this struct. More...
 
bool isSignExplicit () const
 Returns whether the sign was explicitly mentioned by the user. More...
 
const StructgetStruct () const
 Get the struct definition. More...
 
void format (llvm::raw_ostream &os) const
 Format this struct in SystemVerilog syntax. More...
 
 operator const Struct & () const
 Allow implicit casts from PackedStructType to the actual struct definition. More...
 

Static Public Member Functions

static PackedStructType get (StructKind kind, ArrayRef< StructMember > members, StringAttr name, Location loc, std::optional< Sign > sign={})
 
static PackedStructType get (const Struct &strukt, std::optional< Sign > sign={})
 

Static Public Attributes

static constexpr StringLiteral name = "moore.packed_struct"
 

Detailed Description

A packed struct.

Definition at line 1170 of file MooreTypes.h.

Member Function Documentation

◆ format()

void circt::moore::PackedStructType::format ( llvm::raw_ostream &  os) const
inline

Format this struct in SystemVerilog syntax.

Useful to present the struct back to the user in diagnostics.

Definition at line 1191 of file MooreTypes.h.

References circt::moore::Struct::format(), getSign(), getStruct(), and isSignExplicit().

◆ get() [1/2]

static PackedStructType circt::moore::PackedStructType::get ( const Struct strukt,
std::optional< Sign sign = {} 
)
inlinestatic

Definition at line 1177 of file MooreTypes.h.

◆ get() [2/2]

PackedStructType PackedStructType::get ( StructKind  kind,
ArrayRef< StructMember members,
StringAttr  name,
Location  loc,
std::optional< Sign sign = {} 
)
static

◆ getSign()

Sign PackedStructType::getSign ( ) const

Get the sign of this struct.

Definition at line 1139 of file MooreTypes.cpp.

Referenced by format().

◆ getStruct()

const Struct & PackedStructType::getStruct ( ) const

Get the struct definition.

Definition at line 1145 of file MooreTypes.cpp.

Referenced by format(), and operator const Struct &().

◆ isSignExplicit()

bool PackedStructType::isSignExplicit ( ) const

Returns whether the sign was explicitly mentioned by the user.

Definition at line 1141 of file MooreTypes.cpp.

Referenced by format().

◆ operator const Struct &()

circt::moore::PackedStructType::operator const Struct & ( ) const
inline

Allow implicit casts from PackedStructType to the actual struct definition.

Definition at line 1199 of file MooreTypes.h.

References getStruct().

Member Data Documentation

◆ name

constexpr StringLiteral circt::moore::PackedStructType::name = "moore.packed_struct"
staticconstexpr

Definition at line 1201 of file MooreTypes.h.

Referenced by get().


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