summaryrefslogtreecommitdiff
path: root/src/generate-names.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/generate-names.cc')
-rw-r--r--src/generate-names.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/generate-names.cc b/src/generate-names.cc
index 451cb3b6..a1b02fb4 100644
--- a/src/generate-names.cc
+++ b/src/generate-names.cc
@@ -39,6 +39,7 @@ class NameGenerator : public ExprVisitor::DelegateNop {
Result BeginBlockExpr(BlockExpr* expr) override;
Result BeginLoopExpr(LoopExpr* expr) override;
Result BeginIfExpr(IfExpr* expr) override;
+ Result BeginIfExceptExpr(IfExceptExpr* expr) override;
private:
static bool HasName(const std::string& str);
@@ -207,6 +208,11 @@ Result NameGenerator::BeginIfExpr(IfExpr* expr) {
return Result::Ok;
}
+Result NameGenerator::BeginIfExceptExpr(IfExceptExpr* expr) {
+ MaybeGenerateName("$E", label_count_++, &expr->true_.label);
+ return Result::Ok;
+}
+
Result NameGenerator::VisitFunc(Index func_index, Func* func) {
MaybeGenerateAndBindName(&module_->func_bindings, "$f", func_index,
&func->name);