Skip to content

Commit

Permalink
[flang] Use value instead of getValue (NFC)
Browse files Browse the repository at this point in the history
Flang C++ Style Guide tells us to use x.value() when no presence test
is obviously protecting the reference.
  • Loading branch information
kazutakahirata committed Jul 20, 2022
1 parent 868e1ee commit afb9d89
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions flang/lib/Lower/ConvertExpr.cpp
Expand Up @@ -2679,9 +2679,9 @@ class ScalarExprLowering {
funcSymbolAttr, operands);

if (caller.mustSaveResult())
builder.create<fir::SaveResultOp>(
loc, call.getResult(0), fir::getBase(allocatedResult.getValue()),
arrayResultShape, resultLengths);
builder.create<fir::SaveResultOp>(loc, call.getResult(0),
fir::getBase(allocatedResult.value()),
arrayResultShape, resultLengths);

if (allocatedResult) {
allocatedResult->match(
Expand Down Expand Up @@ -4237,10 +4237,10 @@ class ArrayExprLowering {
mlir::Value{});
}
} else if (isBoundsRemap()) {
auto lbs = lbounds.getValue();
auto lbs = lbounds.value();
if (lbs.size() > 0) {
// Rebox the value with user-specified shift and shape.
auto shapeShiftArgs = flatZip(lbs, ubounds.getValue());
auto shapeShiftArgs = flatZip(lbs, ubounds.value());
auto shapeTy = fir::ShapeShiftType::get(eleTy.getContext(), lbs.size());
mlir::Value shapeShift =
builder.create<fir::ShapeShiftOp>(loc, shapeTy, shapeShiftArgs);
Expand Down

0 comments on commit afb9d89

Please sign in to comment.