From e8f9d207427bda2f6e22c28ff0210b294b1f70e1 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Tue, 7 Jan 2020 11:16:44 -0800 Subject: [NFC] Enforce use of `Type::` on type names (#2434) --- src/ir/branch-utils.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/ir/branch-utils.h') diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h index a22301e54..363a9c9e2 100644 --- a/src/ir/branch-utils.h +++ b/src/ir/branch-utils.h @@ -28,17 +28,17 @@ namespace BranchUtils { // (unreachable))) inline bool isBranchReachable(Break* br) { - return !(br->value && br->value->type == unreachable) && - !(br->condition && br->condition->type == unreachable); + return !(br->value && br->value->type == Type::unreachable) && + !(br->condition && br->condition->type == Type::unreachable); } inline bool isBranchReachable(Switch* sw) { - return !(sw->value && sw->value->type == unreachable) && - sw->condition->type != unreachable; + return !(sw->value && sw->value->type == Type::unreachable) && + sw->condition->type != Type::unreachable; } inline bool isBranchReachable(BrOnExn* br) { - return br->exnref->type != unreachable; + return br->exnref->type != Type::unreachable; } inline bool isBranchReachable(Expression* expr) { @@ -159,14 +159,16 @@ struct BranchSeeker : public PostWalker { BranchSeeker(Name target) : target(target) {} - void noteFound(Expression* value) { noteFound(value ? value->type : none); } + void noteFound(Expression* value) { + noteFound(value ? value->type : Type::none); + } void noteFound(Type type) { found++; if (found == 1) { - valueType = unreachable; + valueType = Type::unreachable; } - if (type != unreachable) { + if (type != Type::unreachable) { valueType = type; } } -- cgit v1.2.3