@@ -26,165 +26,165 @@ namespace Fortran::semantics {
2626// / FIXME: This can be improved to dump more information in some cases.
2727class DumpEvaluateExpr {
2828public:
29- DumpEvaluateExpr () : outs (llvm::errs()) {}
30- DumpEvaluateExpr (llvm::raw_ostream &str) : outs (str) {}
29+ DumpEvaluateExpr () : outs_ (llvm::errs()) {}
30+ DumpEvaluateExpr (llvm::raw_ostream &str) : outs_ (str) {}
3131
32- template <typename A> static void dump (const A &x) {
33- DumpEvaluateExpr{}.show (x);
32+ template <typename A> static void Dump (const A &x) {
33+ DumpEvaluateExpr{}.Show (x);
3434 }
3535 template <typename A>
36- static void dump (llvm::raw_ostream &stream, const A &x) {
37- DumpEvaluateExpr{stream}.show (x);
36+ static void Dump (llvm::raw_ostream &stream, const A &x) {
37+ DumpEvaluateExpr{stream}.Show (x);
3838 }
3939
4040private:
41- template <typename A, bool C> void show (const common::Indirection<A, C> &x) {
42- show (x.value ());
41+ template <typename A, bool C> void Show (const common::Indirection<A, C> &x) {
42+ Show (x.value ());
4343 }
44- template <typename A> void show (const SymbolRef x) { show (*x); }
45- template <typename A> void show (const std::unique_ptr<A> &x) {
46- show (x.get ());
44+ template <typename A> void Show (const SymbolRef x) { Show (*x); }
45+ template <typename A> void Show (const std::unique_ptr<A> &x) {
46+ Show (x.get ());
4747 }
48- template <typename A> void show (const std::shared_ptr<A> &x) {
49- show (x.get ());
48+ template <typename A> void Show (const std::shared_ptr<A> &x) {
49+ Show (x.get ());
5050 }
51- template <typename A> void show (const A *x) {
51+ template <typename A> void Show (const A *x) {
5252 if (x) {
53- show (*x);
53+ Show (*x);
5454 return ;
5555 }
56- print (" nullptr" );
56+ Print (" nullptr" );
5757 }
58- template <typename A> void show (const std::optional<A> &x) {
58+ template <typename A> void Show (const std::optional<A> &x) {
5959 if (x) {
60- show (*x);
60+ Show (*x);
6161 return ;
6262 }
63- print (" None" );
63+ Print (" None" );
6464 }
65- template <typename ... A> void show (const std::variant<A...> &u) {
66- common::visit ([&](const auto &v) { show (v); }, u);
65+ template <typename ... A> void Show (const std::variant<A...> &u) {
66+ common::visit ([&](const auto &v) { Show (v); }, u);
6767 }
68- template <typename A> void show (const std::vector<A> &x) {
69- indent (" vector" );
68+ template <typename A> void Show (const std::vector<A> &x) {
69+ Indent (" vector" );
7070 for (const auto &v : x)
71- show (v);
72- outdent ();
71+ Show (v);
72+ Outdent ();
7373 }
74- void show (const evaluate::BOZLiteralConstant &);
75- void show (const evaluate::NullPointer &);
76- template <typename T> void show (const evaluate::Constant<T> &x) {
74+ void Show (const evaluate::BOZLiteralConstant &);
75+ void Show (const evaluate::NullPointer &);
76+ template <typename T> void Show (const evaluate::Constant<T> &x) {
7777 if constexpr (T::category == common::TypeCategory::Derived) {
78- indent (" derived constant" );
78+ Indent (" derived constant" );
7979 for (const auto &map : x.values ())
8080 for (const auto &pair : map)
81- show (pair.second .value ());
82- outdent ();
81+ Show (pair.second .value ());
82+ Outdent ();
8383 } else {
84- print (" constant" );
84+ Print (" constant" );
8585 }
8686 }
87- void show (const Symbol &symbol);
88- void show (const evaluate::StaticDataObject &);
89- void show (const evaluate::ImpliedDoIndex &);
90- void show (const evaluate::BaseObject &x);
91- void show (const evaluate::Component &x);
92- void show (const evaluate::NamedEntity &x);
93- void show (const evaluate::TypeParamInquiry &x);
94- void show (const evaluate::Triplet &x);
95- void show (const evaluate::Subscript &x);
96- void show (const evaluate::ArrayRef &x);
97- void show (const evaluate::CoarrayRef &x);
98- void show (const evaluate::DataRef &x);
99- void show (const evaluate::Substring &x);
100- void show (const evaluate::ComplexPart &x);
101- template <typename T> void show (const evaluate::Designator<T> &x) {
102- indent (" designator" );
103- show (x.u );
104- outdent ();
105- }
106- template <typename T> void show (const evaluate::Variable<T> &x) {
107- indent (" variable" );
108- show (x.u );
109- outdent ();
110- }
111- void show (const evaluate::DescriptorInquiry &x);
112- void show (const evaluate::SpecificIntrinsic &);
113- void show (const evaluate::ProcedureDesignator &x);
114- void show (const evaluate::ActualArgument &x);
115- void show (const evaluate::ProcedureRef &x) {
116- indent (" procedure ref" );
117- show (x.proc ());
118- show (x.arguments ());
119- outdent ();
120- }
121- template <typename T> void show (const evaluate::FunctionRef<T> &x) {
122- indent (" function ref" );
123- show (x.proc ());
124- show (x.arguments ());
125- outdent ();
126- }
127- template <typename T> void show (const evaluate::ArrayConstructorValue<T> &x) {
128- show (x.u );
87+ void Show (const Symbol &symbol);
88+ void Show (const evaluate::StaticDataObject &);
89+ void Show (const evaluate::ImpliedDoIndex &);
90+ void Show (const evaluate::BaseObject &x);
91+ void Show (const evaluate::Component &x);
92+ void Show (const evaluate::NamedEntity &x);
93+ void Show (const evaluate::TypeParamInquiry &x);
94+ void Show (const evaluate::Triplet &x);
95+ void Show (const evaluate::Subscript &x);
96+ void Show (const evaluate::ArrayRef &x);
97+ void Show (const evaluate::CoarrayRef &x);
98+ void Show (const evaluate::DataRef &x);
99+ void Show (const evaluate::Substring &x);
100+ void Show (const evaluate::ComplexPart &x);
101+ template <typename T> void Show (const evaluate::Designator<T> &x) {
102+ Indent (" designator" );
103+ Show (x.u );
104+ Outdent ();
105+ }
106+ template <typename T> void Show (const evaluate::Variable<T> &x) {
107+ Indent (" variable" );
108+ Show (x.u );
109+ Outdent ();
110+ }
111+ void Show (const evaluate::DescriptorInquiry &x);
112+ void Show (const evaluate::SpecificIntrinsic &);
113+ void Show (const evaluate::ProcedureDesignator &x);
114+ void Show (const evaluate::ActualArgument &x);
115+ void Show (const evaluate::ProcedureRef &x) {
116+ Indent (" procedure ref" );
117+ Show (x.proc ());
118+ Show (x.arguments ());
119+ Outdent ();
120+ }
121+ template <typename T> void Show (const evaluate::FunctionRef<T> &x) {
122+ Indent (" function ref" );
123+ Show (x.proc ());
124+ Show (x.arguments ());
125+ Outdent ();
126+ }
127+ template <typename T> void Show (const evaluate::ArrayConstructorValue<T> &x) {
128+ Show (x.u );
129129 }
130130 template <typename T>
131- void show (const evaluate::ArrayConstructorValues<T> &x) {
132- indent (" array constructor value" );
131+ void Show (const evaluate::ArrayConstructorValues<T> &x) {
132+ Indent (" array constructor value" );
133133 for (auto &v : x)
134- show (v);
135- outdent ();
136- }
137- template <typename T> void show (const evaluate::ImpliedDo<T> &x) {
138- indent (" implied do" );
139- show (x.lower ());
140- show (x.upper ());
141- show (x.stride ());
142- show (x.values ());
143- outdent ();
144- }
145- void show (const ParamValue &x);
146- void show (const DerivedTypeSpec::ParameterMapType::value_type &x);
147- void show (const DerivedTypeSpec &x);
148- void show (const evaluate::StructureConstructorValues::value_type &x);
149- void show (const evaluate::StructureConstructor &x);
134+ Show (v);
135+ Outdent ();
136+ }
137+ template <typename T> void Show (const evaluate::ImpliedDo<T> &x) {
138+ Indent (" implied do" );
139+ Show (x.lower ());
140+ Show (x.upper ());
141+ Show (x.stride ());
142+ Show (x.values ());
143+ Outdent ();
144+ }
145+ void Show (const ParamValue &x);
146+ void Show (const DerivedTypeSpec::ParameterMapType::value_type &x);
147+ void Show (const DerivedTypeSpec &x);
148+ void Show (const evaluate::StructureConstructorValues::value_type &x);
149+ void Show (const evaluate::StructureConstructor &x);
150150 template <typename D, typename R, typename O>
151- void show (const evaluate::Operation<D, R, O> &op) {
152- indent (" unary op" );
153- show (op.left ());
154- outdent ();
151+ void Show (const evaluate::Operation<D, R, O> &op) {
152+ Indent (" unary op" );
153+ Show (op.left ());
154+ Outdent ();
155155 }
156156 template <typename D, typename R, typename LO, typename RO>
157- void show (const evaluate::Operation<D, R, LO, RO> &op) {
158- indent (" binary op" );
159- show (op.left ());
160- show (op.right ());
161- outdent ();
162- }
163- void show (const evaluate::Relational<evaluate::SomeType> &x);
164- template <typename T> void show (const evaluate::Expr<T> &x) {
165- indent (" expr T" );
166- show (x.u );
167- outdent ();
157+ void Show (const evaluate::Operation<D, R, LO, RO> &op) {
158+ Indent (" binary op" );
159+ Show (op.left ());
160+ Show (op.right ());
161+ Outdent ();
162+ }
163+ void Show (const evaluate::Relational<evaluate::SomeType> &x);
164+ template <typename T> void Show (const evaluate::Expr<T> &x) {
165+ Indent (" expr T" );
166+ Show (x.u );
167+ Outdent ();
168168 }
169169
170- const char *getIndentString () const ;
171- void print (llvm::Twine s);
172- void indent (llvm::StringRef s);
173- void outdent ();
170+ const char *GetIndentString () const ;
171+ void Print (llvm::Twine s);
172+ void Indent (llvm::StringRef s);
173+ void Outdent ();
174174
175- llvm::raw_ostream &outs ;
176- unsigned level {0 };
175+ llvm::raw_ostream &outs_ ;
176+ unsigned level_ {0 };
177177};
178178
179- LLVM_DUMP_METHOD void dumpEvExpr (const evaluate::Expr<evaluate::SomeType> &x);
180- LLVM_DUMP_METHOD void dumpEvExpr (
179+ LLVM_DUMP_METHOD void DumpEvExpr (const evaluate::Expr<evaluate::SomeType> &x);
180+ LLVM_DUMP_METHOD void DumpEvExpr (
181181 const evaluate::Expr<evaluate::Type<common::TypeCategory::Integer, 4 >> &x);
182- LLVM_DUMP_METHOD void dumpEvExpr (
182+ LLVM_DUMP_METHOD void DumpEvExpr (
183183 const evaluate::Expr<evaluate::Type<common::TypeCategory::Integer, 8 >> &x);
184- LLVM_DUMP_METHOD void dumpEvExpr (const evaluate::ArrayRef &x);
185- LLVM_DUMP_METHOD void dumpEvExpr (const evaluate::DataRef &x);
186- LLVM_DUMP_METHOD void dumpEvExpr (const evaluate::Substring &x);
187- LLVM_DUMP_METHOD void dumpEvExpr (
184+ LLVM_DUMP_METHOD void DumpEvExpr (const evaluate::ArrayRef &x);
185+ LLVM_DUMP_METHOD void DumpEvExpr (const evaluate::DataRef &x);
186+ LLVM_DUMP_METHOD void DumpEvExpr (const evaluate::Substring &x);
187+ LLVM_DUMP_METHOD void DumpEvExpr (
188188 const evaluate::Designator<evaluate::Type<common::TypeCategory::Integer, 4 >>
189189 &x);
190190
0 commit comments