CIRCT  19.0.0git
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
circt::ExportVerilog::StringOrOpToEmit Class Reference

This class wraps an operation or a fixed string that should be emitted. More...

#include <ExportVerilogInternals.h>

Collaboration diagram for circt::ExportVerilog::StringOrOpToEmit:
Collaboration graph
[legend]

Public Member Functions

 StringOrOpToEmit (Operation *op)
 
 StringOrOpToEmit (StringRef string)
 
 ~StringOrOpToEmit ()
 
Operation * getOperation () const
 If the value is an Operation*, return it. Otherwise return null. More...
 
StringRef getStringData () const
 If the value wraps a string, return it. Otherwise return null. More...
 
void setString (StringRef value)
 This method transforms the entry from an operation to a string value. More...
 
 StringOrOpToEmit (StringOrOpToEmit &&rhs)
 

Public Attributes

OpLocMap verilogLocs
 Verilog output location information for entry. More...
 

Private Member Functions

 StringOrOpToEmit (const StringOrOpToEmit &)=delete
 
void operator= (const StringOrOpToEmit &)=delete
 

Private Attributes

PointerUnion< Operation *, const void * > pointerData
 
size_t length
 

Detailed Description

This class wraps an operation or a fixed string that should be emitted.

Definition at line 277 of file ExportVerilogInternals.h.

Constructor & Destructor Documentation

◆ StringOrOpToEmit() [1/4]

circt::ExportVerilog::StringOrOpToEmit::StringOrOpToEmit ( Operation *  op)
inlineexplicit

Definition at line 279 of file ExportVerilogInternals.h.

◆ StringOrOpToEmit() [2/4]

circt::ExportVerilog::StringOrOpToEmit::StringOrOpToEmit ( StringRef  string)
inlineexplicit

Definition at line 281 of file ExportVerilogInternals.h.

References pointerData, and setString().

◆ ~StringOrOpToEmit()

circt::ExportVerilog::StringOrOpToEmit::~StringOrOpToEmit ( )
inline

Definition at line 286 of file ExportVerilogInternals.h.

References pointerData.

◆ StringOrOpToEmit() [3/4]

circt::ExportVerilog::StringOrOpToEmit::StringOrOpToEmit ( StringOrOpToEmit &&  rhs)
inline

Definition at line 313 of file ExportVerilogInternals.h.

◆ StringOrOpToEmit() [4/4]

circt::ExportVerilog::StringOrOpToEmit::StringOrOpToEmit ( const StringOrOpToEmit )
privatedelete

Member Function Documentation

◆ getOperation()

Operation* circt::ExportVerilog::StringOrOpToEmit::getOperation ( ) const
inline

If the value is an Operation*, return it. Otherwise return null.

Definition at line 292 of file ExportVerilogInternals.h.

References pointerData.

Referenced by circt::ExportVerilog::SharedEmitterState::emitOps().

◆ getStringData()

StringRef circt::ExportVerilog::StringOrOpToEmit::getStringData ( ) const
inline

If the value wraps a string, return it. Otherwise return null.

Definition at line 297 of file ExportVerilogInternals.h.

References length, and pointerData.

◆ operator=()

void circt::ExportVerilog::StringOrOpToEmit::operator= ( const StringOrOpToEmit )
privatedelete

◆ setString()

void circt::ExportVerilog::StringOrOpToEmit::setString ( StringRef  value)
inline

This method transforms the entry from an operation to a string value.

Definition at line 304 of file ExportVerilogInternals.h.

References assert(), length, and pointerData.

Referenced by circt::ExportVerilog::SharedEmitterState::emitOps(), and StringOrOpToEmit().

Member Data Documentation

◆ length

size_t circt::ExportVerilog::StringOrOpToEmit::length
private

Definition at line 326 of file ExportVerilogInternals.h.

Referenced by getStringData(), and setString().

◆ pointerData

PointerUnion<Operation *, const void *> circt::ExportVerilog::StringOrOpToEmit::pointerData
private

◆ verilogLocs

OpLocMap circt::ExportVerilog::StringOrOpToEmit::verilogLocs

Verilog output location information for entry.

This is required since each entry can be emitted in parallel.

Definition at line 320 of file ExportVerilogInternals.h.

Referenced by circt::ExportVerilog::SharedEmitterState::emitOps().


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