[flang] small tweaks
Original-commit: flang-compiler/f18@5bbd6c3c19 Reviewed-on: https://github.com/flang-compiler/f18/pull/225 Tree-same-pre-rewrite: false
This commit is contained in:
parent
cfb57cd2d3
commit
fdd006ea28
1 changed files with 9 additions and 5 deletions
|
@ -357,6 +357,8 @@ struct Concat
|
||||||
static std::ostream &Infix(std::ostream &o) { return o << "//"; }
|
static std::ostream &Infix(std::ostream &o) { return o << "//"; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO: Once the symbol table supports compiler temporaries,
|
||||||
|
// just put the literal string into one and use a regular Substring.
|
||||||
template<int KIND>
|
template<int KIND>
|
||||||
struct LiteralSubstring : public Operation<LiteralSubstring<KIND>,
|
struct LiteralSubstring : public Operation<LiteralSubstring<KIND>,
|
||||||
Type<TypeCategory::Character, KIND>,
|
Type<TypeCategory::Character, KIND>,
|
||||||
|
@ -401,14 +403,14 @@ struct LogicalOperation
|
||||||
|
|
||||||
template<typename RESULT> struct ArrayConstructorValues;
|
template<typename RESULT> struct ArrayConstructorValues;
|
||||||
|
|
||||||
template<typename ITEM, typename OPERAND> struct ImpliedDo {
|
template<typename VALUES, typename OPERAND> struct ImpliedDo {
|
||||||
using Item = ITEM;
|
using Values = VALUES;
|
||||||
using Result = typename Item::Result;
|
|
||||||
using Operand = OPERAND;
|
using Operand = OPERAND;
|
||||||
|
using Result = ResultType<Values>;
|
||||||
static_assert(Operand::category == TypeCategory::Integer);
|
static_assert(Operand::category == TypeCategory::Integer);
|
||||||
parser::CharBlock controlVariableName;
|
parser::CharBlock controlVariableName;
|
||||||
CopyableIndirection<Expr<Operand>> lower, upper, stride;
|
CopyableIndirection<Expr<Operand>> lower, upper, stride;
|
||||||
CopyableIndirection<Item> values;
|
CopyableIndirection<Values> values;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename RESULT> struct ArrayConstructorValue {
|
template<typename RESULT> struct ArrayConstructorValue {
|
||||||
|
@ -432,11 +434,13 @@ template<typename RESULT>
|
||||||
struct ArrayConstructor : public ArrayConstructorValues<RESULT> {
|
struct ArrayConstructor : public ArrayConstructorValues<RESULT> {
|
||||||
using Result = RESULT;
|
using Result = RESULT;
|
||||||
using ArrayConstructorValues<Result>::ArrayConstructorValues;
|
using ArrayConstructorValues<Result>::ArrayConstructorValues;
|
||||||
Result result;
|
|
||||||
DynamicType GetType() const;
|
DynamicType GetType() const;
|
||||||
static constexpr int Rank() { return 1; }
|
static constexpr int Rank() { return 1; }
|
||||||
Expr<SubscriptInteger> LEN() const;
|
Expr<SubscriptInteger> LEN() const;
|
||||||
std::ostream &Dump(std::ostream &) const;
|
std::ostream &Dump(std::ostream &) const;
|
||||||
|
|
||||||
|
Result result;
|
||||||
|
std::vector<Expr<SubscriptInteger>> typeParameterValues;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Per-category expression representations
|
// Per-category expression representations
|
||||||
|
|
Loading…
Reference in a new issue