[mlir][toy] Replace Optional::getValue with value. NFC

This commit is contained in:
Fangrui Song 2022-07-29 01:10:51 -07:00
parent e590f945c6
commit 0595edd80f
6 changed files with 6 additions and 6 deletions

View File

@ -221,7 +221,7 @@ private:
// 'return' takes an optional expression, handle that case here.
mlir::Value expr = nullptr;
if (ret.getExpr().hasValue()) {
if (!(expr = mlirGen(*ret.getExpr().getValue())))
if (!(expr = mlirGen(*ret.getExpr().value())))
return mlir::failure();
}

View File

@ -221,7 +221,7 @@ private:
// 'return' takes an optional expression, handle that case here.
mlir::Value expr = nullptr;
if (ret.getExpr().hasValue()) {
if (!(expr = mlirGen(*ret.getExpr().getValue())))
if (!(expr = mlirGen(*ret.getExpr().value())))
return mlir::failure();
}

View File

@ -225,7 +225,7 @@ private:
// 'return' takes an optional expression, handle that case here.
mlir::Value expr = nullptr;
if (ret.getExpr().hasValue()) {
if (!(expr = mlirGen(*ret.getExpr().getValue())))
if (!(expr = mlirGen(*ret.getExpr().value())))
return mlir::failure();
}

View File

@ -225,7 +225,7 @@ private:
// 'return' takes an optional expression, handle that case here.
mlir::Value expr = nullptr;
if (ret.getExpr().hasValue()) {
if (!(expr = mlirGen(*ret.getExpr().getValue())))
if (!(expr = mlirGen(*ret.getExpr().value())))
return mlir::failure();
}

View File

@ -225,7 +225,7 @@ private:
// 'return' takes an optional expression, handle that case here.
mlir::Value expr = nullptr;
if (ret.getExpr().hasValue()) {
if (!(expr = mlirGen(*ret.getExpr().getValue())))
if (!(expr = mlirGen(*ret.getExpr().value())))
return mlir::failure();
}

View File

@ -358,7 +358,7 @@ private:
// 'return' takes an optional expression, handle that case here.
mlir::Value expr = nullptr;
if (ret.getExpr().hasValue()) {
if (!(expr = mlirGen(*ret.getExpr().getValue())))
if (!(expr = mlirGen(*ret.getExpr().value())))
return mlir::failure();
}