[flang-commits] [flang] feb44cc - [flang][NFC] Fix some typos

Valentin Clement via flang-commits flang-commits at lists.llvm.org
Wed Jun 29 03:36:18 PDT 2022


Author: Valentin Clement
Date: 2022-06-29T12:35:58+02:00
New Revision: feb44ccc913b3de6ec5ab9f74011e99614991439

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

LOG: [flang][NFC] Fix some typos

Added: 
    

Modified: 
    flang/include/flang/Optimizer/Builder/FIRBuilder.h
    flang/include/flang/Optimizer/Builder/MutableBox.h
    flang/include/flang/Optimizer/Builder/Runtime/Character.h

Removed: 
    


################################################################################
diff  --git a/flang/include/flang/Optimizer/Builder/FIRBuilder.h b/flang/include/flang/Optimizer/Builder/FIRBuilder.h
index ec9da6b714572..23b16af4c3bd6 100644
--- a/flang/include/flang/Optimizer/Builder/FIRBuilder.h
+++ b/flang/include/flang/Optimizer/Builder/FIRBuilder.h
@@ -89,7 +89,7 @@ class FirOpBuilder : public mlir::OpBuilder {
   /// Create a sequence of `eleTy` with `rank` dimensions of unknown size.
   mlir::Type getVarLenSeqTy(mlir::Type eleTy, unsigned rank = 1);
 
-  /// Get character length type
+  /// Get character length type.
   mlir::Type getCharacterLengthType() { return getIndexType(); }
 
   /// Get the integer type whose bit width corresponds to the width of pointer
@@ -306,7 +306,8 @@ class FirOpBuilder : public mlir::OpBuilder {
   /// \p exv is an extended value holding a memory reference to the object that
   /// must be boxed. This function will crash if provided something that is not
   /// a memory reference type.
-  /// Array entities are boxed with a shape and character with their length.
+  /// Array entities are boxed with a shape and possibly a shift. Character
+  /// entities are boxed with a LEN parameter.
   mlir::Value createBox(mlir::Location loc, const fir::ExtendedValue &exv);
 
   /// Create constant i1 with value 1. if \p b is true or 0. otherwise
@@ -440,9 +441,9 @@ llvm::SmallVector<mlir::Value>
 getNonDefaultLowerBounds(fir::FirOpBuilder &builder, mlir::Location loc,
                          const fir::ExtendedValue &exv);
 
-/// Return length parameters associated to \p exv that are not deferred (that
-/// are available without having to read any fir.box values).
-/// Empty if \p exv has no length parameters or if they are all deferred.
+/// Return LEN parameters associated to \p exv that are not deferred (that are
+/// available without having to read any fir.box values). Empty if \p exv has no
+/// LEN parameters or if they are all deferred.
 llvm::SmallVector<mlir::Value>
 getNonDeferredLengthParams(const fir::ExtendedValue &exv);
 
@@ -450,8 +451,8 @@ getNonDeferredLengthParams(const fir::ExtendedValue &exv);
 // String literal helper helpers
 //===----------------------------------------------------------------------===//
 
-/// Create a !fir.char<1> string literal global and returns a
-/// fir::CharBoxValue with its address and length.
+/// Create a !fir.char<1> string literal global and returns a fir::CharBoxValue
+/// with its address and length.
 fir::ExtendedValue createStringLiteral(fir::FirOpBuilder &, mlir::Location,
                                        llvm::StringRef string);
 
@@ -486,9 +487,9 @@ fir::ExtendedValue componentToExtendedValue(fir::FirOpBuilder &builder,
 
 /// Given the address of an array element and the ExtendedValue describing the
 /// array, returns the ExtendedValue describing the array element. The purpose
-/// is to propagate the length parameters of the array to the element.
-/// This can be used for elements of `array` or `array(i:j:k)`. If \p element
-/// belongs to an array section `array%x` whose base is \p array,
+/// is to propagate the LEN parameters of the array to the element. This can be
+/// used for elements of `array` or `array(i:j:k)`. If \p element belongs to an
+/// array section `array%x` whose base is \p array,
 /// arraySectionElementToExtendedValue must be used instead.
 fir::ExtendedValue arrayElementToExtendedValue(fir::FirOpBuilder &builder,
                                                mlir::Location loc,

diff  --git a/flang/include/flang/Optimizer/Builder/MutableBox.h b/flang/include/flang/Optimizer/Builder/MutableBox.h
index de0e5db4f3e9a..664d6c44be4f2 100644
--- a/flang/include/flang/Optimizer/Builder/MutableBox.h
+++ b/flang/include/flang/Optimizer/Builder/MutableBox.h
@@ -35,7 +35,7 @@ namespace fir::factory {
 /// allocatable variable. Initialization of such variable has to be done at the
 /// beginning of the variable lifetime by storing the created box in the memory
 /// for the variable box.
-/// \p nonDeferredParams must provide the non deferred length parameters so that
+/// \p nonDeferredParams must provide the non deferred LEN parameters so that
 /// they can already be placed in the unallocated box (inquiries about these
 /// parameters are legal even in unallocated state).
 mlir::Value createUnallocatedBox(fir::FirOpBuilder &builder, mlir::Location loc,
@@ -77,13 +77,13 @@ void disassociateMutableBox(fir::FirOpBuilder &builder, mlir::Location loc,
                             const fir::MutableBoxValue &box);
 
 /// Generate code to conditionally reallocate a MutableBoxValue with a new
-/// shape, lower bounds, and length parameters if it is unallocated or if its
-/// current shape or deferred  length parameters do not match the provided ones.
+/// shape, lower bounds, and LEN parameters if it is unallocated or if its
+/// current shape or deferred  LEN parameters do not match the provided ones.
 /// Lower bounds are only used if the entity needs to be allocated, otherwise,
 /// the MutableBoxValue will keep its current lower bounds.
 /// If the MutableBoxValue is an array, the provided shape can be empty, in
 /// which case the MutableBoxValue must already be allocated at runtime and its
-/// shape and lower bounds will be kept. If \p shape is empty, only a length
+/// shape and lower bounds will be kept. If \p shape is empty, only a LEN
 /// parameter mismatch can trigger a reallocation. See Fortran 10.2.1.3 point 3
 /// that this function is implementing for more details. The polymorphic
 /// requirements are not yet covered by this function.

diff  --git a/flang/include/flang/Optimizer/Builder/Runtime/Character.h b/flang/include/flang/Optimizer/Builder/Runtime/Character.h
index ddfe11d5a656a..491666e83c00b 100644
--- a/flang/include/flang/Optimizer/Builder/Runtime/Character.h
+++ b/flang/include/flang/Optimizer/Builder/Runtime/Character.h
@@ -24,7 +24,7 @@ namespace fir::runtime {
 /// complex runtime cases handling left or right adjustments.
 ///
 /// \p resultBox must be an unallocated allocatable used for the temporary
-/// result. \p StringBox must be a fir.box describing the adjustl string
+/// result. \p StringBox must be a `fir.box` describing the `ADJUSTL` string
 /// argument. Note that the \p genAdjust() helper is called to do the majority
 /// of the lowering work.
 void genAdjustL(fir::FirOpBuilder &builder, mlir::Location loc,


        


More information about the flang-commits mailing list