[flang] Use value instead of getValue (NFC)
authorKazu Hirata <kazu@google.com>
Wed, 20 Jul 2022 04:49:14 +0000 (21:49 -0700)
committerKazu Hirata <kazu@google.com>
Wed, 20 Jul 2022 04:49:15 +0000 (21:49 -0700)
Flang C++ Style Guide tells us to use x.value() when no presence test
is obviously protecting the reference.

flang/lib/Lower/ConvertExpr.cpp

index a45949e..f916626 100644 (file)
@@ -2679,9 +2679,9 @@ public:
                                             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(
@@ -4237,10 +4237,10 @@ private:
                                            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);