summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index d6dbb3300..18f2beb43 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -59,12 +59,12 @@ static std::ostream& printLocal(Index index, Function* func, std::ostream& o) {
// Unlike the default format, tuple types in s-expressions should not have
// commas.
-struct LocalType {
+struct SExprType {
Type type;
- LocalType(Type type) : type(type){};
+ SExprType(Type type) : type(type){};
};
-static std::ostream& operator<<(std::ostream& o, const LocalType& localType) {
+static std::ostream& operator<<(std::ostream& o, const SExprType& localType) {
Type type = localType.type;
if (type.isMulti()) {
const std::vector<Type>& types = type.expand();
@@ -2072,9 +2072,9 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> {
}
void emitGlobalType(Global* curr) {
if (curr->mutable_) {
- o << "(mut " << curr->type << ')';
+ o << "(mut " << SExprType(curr->type) << ')';
} else {
- o << curr->type;
+ o << SExprType(curr->type);
}
}
void visitImportedGlobal(Global* curr) {
@@ -2155,7 +2155,7 @@ struct PrintSExpression : public OverriddenVisitor<PrintSExpression> {
o << '(';
printMinor(o, "local ");
printLocal(i, currFunction, o)
- << ' ' << LocalType(curr->getLocalType(i)) << ')';
+ << ' ' << SExprType(curr->getLocalType(i)) << ')';
o << maybeNewLine;
}
// Print the body.