MLIR  20.0.0git
Macros | Functions
DimLvlMapParser.cpp File Reference
#include "DimLvlMapParser.h"

Go to the source code of this file.

Macros

#define FAILURE_IF_FAILED(RES)
 
#define FAILURE_IF_NULLOPT_OR_FAILED(RES)
 
#define ERROR_IF(COND, MSG)
 

Functions

static bool didntSucceed (OptionalParseResult res)
 Helper function for FAILURE_IF_NULLOPT_OR_FAILED to avoid duplicating its RES parameter. More...
 
static Twine nth (Var::Num n)
 

Macro Definition Documentation

◆ ERROR_IF

#define ERROR_IF (   COND,
  MSG 
)
Value:
if (COND) { \
return parser.emitError(loc, MSG); \
}

Definition at line 32 of file DimLvlMapParser.cpp.

◆ FAILURE_IF_FAILED

#define FAILURE_IF_FAILED (   RES)
Value:
if (failed(RES)) { \
return failure(); \
}

Definition at line 15 of file DimLvlMapParser.cpp.

◆ FAILURE_IF_NULLOPT_OR_FAILED

#define FAILURE_IF_NULLOPT_OR_FAILED (   RES)
Value:
if (didntSucceed(RES)) { \
return failure(); \
}
static bool didntSucceed(OptionalParseResult res)
Helper function for FAILURE_IF_NULLOPT_OR_FAILED to avoid duplicating its RES parameter.

Definition at line 26 of file DimLvlMapParser.cpp.

Function Documentation

◆ didntSucceed()

static bool didntSucceed ( OptionalParseResult  res)
inlinestatic

Helper function for FAILURE_IF_NULLOPT_OR_FAILED to avoid duplicating its RES parameter.

Definition at line 22 of file DimLvlMapParser.cpp.

References mlir::OptionalParseResult::has_value().

◆ nth()

static Twine nth ( Var::Num  n)
inlinestatic

Definition at line 246 of file DimLvlMapParser.cpp.