[flang-commits] [flang] afb9d89 - [flang] Use value instead of getValue (NFC)

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Tue Jul 19 21:49:20 PDT 2022


Author: Kazu Hirata
Date: 2022-07-19T21:49:15-07:00
New Revision: afb9d89ffcf2b556c0ccfd63ff484ab178160136

URL: https://github.com/llvm/llvm-project/commit/afb9d89ffcf2b556c0ccfd63ff484ab178160136
DIFF: https://github.com/llvm/llvm-project/commit/afb9d89ffcf2b556c0ccfd63ff484ab178160136.diff

LOG: [flang] Use value instead of getValue (NFC)

Flang C++ Style Guide tells us to use x.value() when no presence test
is obviously protecting the reference.

Added: 
    

Modified: 
    flang/lib/Lower/ConvertExpr.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp
index a45949ed6c930..f91662618a3c8 100644
--- a/flang/lib/Lower/ConvertExpr.cpp
+++ b/flang/lib/Lower/ConvertExpr.cpp
@@ -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(
@@ -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);


        


More information about the flang-commits mailing list