summaryrefslogtreecommitdiff
path: root/src/ir/branch-utils.h
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2020-01-07 11:16:44 -0800
committerGitHub <noreply@github.com>2020-01-07 11:16:44 -0800
commite8f9d207427bda2f6e22c28ff0210b294b1f70e1 (patch)
tree503b20fb06274e38af7e25e3a1a4106827c52693 /src/ir/branch-utils.h
parentf73b40c7873dbd2dd46a962f3afe5b97a7fc8b0a (diff)
downloadbinaryen-e8f9d207427bda2f6e22c28ff0210b294b1f70e1.tar.gz
binaryen-e8f9d207427bda2f6e22c28ff0210b294b1f70e1.tar.bz2
binaryen-e8f9d207427bda2f6e22c28ff0210b294b1f70e1.zip
[NFC] Enforce use of `Type::` on type names (#2434)
Diffstat (limited to 'src/ir/branch-utils.h')
-rw-r--r--src/ir/branch-utils.h18
1 files changed, 10 insertions, 8 deletions
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> {
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;
}
}