Skip to content

Commit

Permalink
DoConstantFolding: make typeMap param const
Browse files Browse the repository at this point in the history
The DoConstantFolding constructor takes a `TypeMap` parameter (typeMap)
and stores it in a `const TypeMap` variable. Add the `const` keyword for
the parameter. (It does not need to be non-const.)
  • Loading branch information
grg committed Jan 22, 2024
1 parent ca6cc16 commit 38f65f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontends/common/constantFolding.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class DoConstantFolding : public Transform {
Result setContains(const IR::Expression *keySet, const IR::Expression *constant) const;

public:
DoConstantFolding(const ReferenceMap *refMap, TypeMap *typeMap, bool warnings = true)
DoConstantFolding(const ReferenceMap *refMap, const TypeMap *typeMap, bool warnings = true)
: refMap(refMap), typeMap(typeMap), typesKnown(typeMap != nullptr), warnings(warnings) {
visitDagOnce = true;
setName("DoConstantFolding");
Expand Down

0 comments on commit 38f65f1

Please sign in to comment.