MLIR 22.0.0git
mlir::OpWithFlags Class Reference

A wrapper class that allows for printing an operation with a set of flags, useful to act as a "stream modifier" to customize printing an operation with a stream using the operator<< overload, e.g.: llvm::dbgs() << OpWithFlags(op, OpPrintingFlags().skipRegions()); This always prints the operation with the local scope, to avoid introducing spurious newlines in the stream. More...

#include "mlir/IR/Operation.h"

Public Member Functions

 OpWithFlags (Operation *op, OpPrintingFlags flags={})
OpPrintingFlagsflags ()
const OpPrintingFlagsflags () const
OperationgetOperation () const

Friends

raw_ostreamoperator<< (raw_ostream &os, OpWithFlags op)

Detailed Description

A wrapper class that allows for printing an operation with a set of flags, useful to act as a "stream modifier" to customize printing an operation with a stream using the operator<< overload, e.g.: llvm::dbgs() << OpWithFlags(op, OpPrintingFlags().skipRegions()); This always prints the operation with the local scope, to avoid introducing spurious newlines in the stream.

Definition at line 1111 of file Operation.h.

Constructor & Destructor Documentation

◆ OpWithFlags()

mlir::OpWithFlags::OpWithFlags ( Operation * op,
OpPrintingFlags flags = {} )
inline

Definition at line 1113 of file Operation.h.

References flags().

Referenced by operator<<.

Member Function Documentation

◆ flags() [1/2]

OpPrintingFlags & mlir::OpWithFlags::flags ( )
inline

Definition at line 1115 of file Operation.h.

Referenced by mlir::Diagnostic::operator<<(), operator<<, and OpWithFlags().

◆ flags() [2/2]

const OpPrintingFlags & mlir::OpWithFlags::flags ( ) const
inline

Definition at line 1116 of file Operation.h.

◆ getOperation()

Operation * mlir::OpWithFlags::getOperation ( ) const
inline

Definition at line 1117 of file Operation.h.

Referenced by mlir::Diagnostic::operator<<().

◆ operator<<

raw_ostream & operator<< ( raw_ostream & os,
OpWithFlags op )
friend

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