File tree Expand file tree Collapse file tree 2 files changed +1
-20
lines changed Expand file tree Collapse file tree 2 files changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ class CharacterExprHelper {
68
68
const fir::CharBoxValue &rhs);
69
69
70
70
// / LEN_TRIM intrinsic.
71
- mlir::Value createLenTrim (mlir::Value str);
71
+ mlir::Value createLenTrim (const fir::CharBoxValue & str);
72
72
73
73
// / Embox \p addr and \p len and return fir.boxchar.
74
74
// / Take care of type conversions before emboxing.
@@ -163,7 +163,6 @@ class CharacterExprHelper {
163
163
// / FIXME: the implementation also needs a clean-up now that
164
164
// / CharBoxValue are better propagated.
165
165
fir::CharBoxValue materializeValue (mlir::Value str);
166
- fir::CharBoxValue toDataLengthPair (mlir::Value character);
167
166
mlir::Type getReferenceType (const fir::CharBoxValue &c) const ;
168
167
mlir::Type getReferenceType (mlir::Value str) const ;
169
168
mlir::Type getSeqTy (const fir::CharBoxValue &c) const ;
@@ -174,7 +173,6 @@ class CharacterExprHelper {
174
173
void createLengthOneAssign (const fir::CharBoxValue &lhs,
175
174
const fir::CharBoxValue &rhs);
176
175
void createAssign (const fir::CharBoxValue &lhs, const fir::CharBoxValue &rhs);
177
- mlir::Value createLenTrim (const fir::CharBoxValue &str);
178
176
mlir::Value createBlankConstantCode (fir::CharacterType type);
179
177
180
178
private:
Original file line number Diff line number Diff line change @@ -632,20 +632,3 @@ Fortran::lower::CharacterExprHelper::readLengthFromBox(mlir::Value box) {
632
632
}
633
633
return size;
634
634
}
635
-
636
- bool Fortran::lower::CharacterExprHelper::hasConstantLengthInType (
637
- const fir::ExtendedValue &exv) {
638
- auto type = fir::getBase (exv).getType ();
639
- if (auto boxTy = type.dyn_cast <fir::BoxType>())
640
- type = boxTy.getEleTy ();
641
- if (auto eleTy = fir::dyn_cast_ptrEleTy (type))
642
- type = eleTy;
643
- if (auto seqTy = type.dyn_cast <fir::SequenceType>()) {
644
- assert (seqTy.getEleTy ().isa <fir::CharacterType>() &&
645
- " entity is not a character" );
646
- assert (seqTy.getShape ().size () > 0 && " character has empty shape" );
647
- auto lenVal = seqTy.getShape ()[0 ];
648
- return lenVal != fir::SequenceType::getUnknownExtent ();
649
- }
650
- return false ;
651
- }
You can’t perform that action at this time.
0 commit comments