My Project
Public Types | Public Member Functions | Friends | List of all members
mlir::DiagnosticArgument Class Reference

A variant type that holds a single argument for a diagnostic. More...

#include <Diagnostics.h>

Collaboration diagram for mlir::DiagnosticArgument:
Collaboration graph
[legend]

Public Types

enum  DiagnosticArgumentKind {
  DiagnosticArgumentKind::Attribute, DiagnosticArgumentKind::Double, DiagnosticArgumentKind::Integer, DiagnosticArgumentKind::Operation,
  DiagnosticArgumentKind::String, DiagnosticArgumentKind::Type, DiagnosticArgumentKind::Unsigned
}
 

Public Member Functions

void print (raw_ostream &os) const
 Outputs this argument to a stream. More...
 
DiagnosticArgumentKind getKind () const
 Returns the kind of this argument. More...
 
Attribute getAsAttribute () const
 Returns this argument as an Attribute. More...
 
double getAsDouble () const
 Returns this argument as a double. More...
 
int64_t getAsInteger () const
 Returns this argument as a signed integer. More...
 
OperationgetAsOperation () const
 Returns this argument as an operation. More...
 
StringRef getAsString () const
 Returns this argument as a string. More...
 
Type getAsType () const
 Returns this argument as a Type. More...
 
uint64_t getAsUnsigned () const
 Returns this argument as an unsigned integer. More...
 

Friends

class Diagnostic
 

Detailed Description

A variant type that holds a single argument for a diagnostic.

Member Enumeration Documentation

◆ DiagnosticArgumentKind

Enum that represents the different kinds of diagnostic arguments supported.

Enumerator
Attribute 
Double 
Integer 
Operation 
String 
Type 
Unsigned 

Member Function Documentation

◆ getAsAttribute()

Attribute DiagnosticArgument::getAsAttribute ( ) const

Returns this argument as an Attribute.

◆ getAsDouble()

double mlir::DiagnosticArgument::getAsDouble ( ) const
inline

Returns this argument as a double.

◆ getAsInteger()

int64_t mlir::DiagnosticArgument::getAsInteger ( ) const
inline

Returns this argument as a signed integer.

◆ getAsOperation()

Operation& mlir::DiagnosticArgument::getAsOperation ( ) const
inline

Returns this argument as an operation.

◆ getAsString()

StringRef mlir::DiagnosticArgument::getAsString ( ) const
inline

Returns this argument as a string.

◆ getAsType()

Type DiagnosticArgument::getAsType ( ) const

Returns this argument as a Type.

◆ getAsUnsigned()

uint64_t mlir::DiagnosticArgument::getAsUnsigned ( ) const
inline

Returns this argument as an unsigned integer.

◆ getKind()

DiagnosticArgumentKind mlir::DiagnosticArgument::getKind ( ) const
inline

Returns the kind of this argument.

◆ print()

void DiagnosticArgument::print ( raw_ostream &  os) const

Outputs this argument to a stream.

Friends And Related Function Documentation

◆ Diagnostic

friend class Diagnostic
friend

Member Data Documentation

◆ doubleVal

double mlir::DiagnosticArgument::doubleVal

◆ opaqueVal

intptr_t mlir::DiagnosticArgument::opaqueVal

◆ stringVal

StringRef mlir::DiagnosticArgument::stringVal

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