Skip to content

Commit

Permalink
[flang][NFC] Fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
clementval committed Jun 29, 2022
1 parent 1774f2e commit feb44cc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
21 changes: 11 additions & 10 deletions flang/include/flang/Optimizer/Builder/FIRBuilder.h
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -440,18 +441,18 @@ 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);

//===----------------------------------------------------------------------===//
// 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);

Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions flang/include/flang/Optimizer/Builder/MutableBox.h
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Optimizer/Builder/Runtime/Character.h
Expand Up @@ -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,
Expand Down

0 comments on commit feb44cc

Please sign in to comment.