CIRCT  18.0.0git
Public Member Functions | Static Public Member Functions | 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={})
 

Detailed Description

A packed struct.

Definition at line 1116 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 1137 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 1123 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 1129 of file MooreTypes.cpp.

Referenced by format().

◆ getStruct()

const Struct & PackedStructType::getStruct ( ) const

Get the struct definition.

Definition at line 1135 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 1131 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 1145 of file MooreTypes.h.

References getStruct().


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