summaryrefslogtreecommitdiff
path: root/src/cfg/domtree.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cfg/domtree.h')
-rw-r--r--src/cfg/domtree.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cfg/domtree.h b/src/cfg/domtree.h
index 5e54f7c32..5753a3114 100644
--- a/src/cfg/domtree.h
+++ b/src/cfg/domtree.h
@@ -47,6 +47,10 @@ namespace wasm {
template<typename BasicBlock> struct DomTree {
std::vector<Index> iDoms;
+ // Use a nonsense value to indicate what has yet to be initialized or what is
+ // irrelevant.
+ enum { nonsense = Index(-1) };
+
DomTree(std::vector<std::unique_ptr<BasicBlock>>& blocks);
};
@@ -84,9 +88,6 @@ DomTree<BasicBlock>::DomTree(std::vector<std::unique_ptr<BasicBlock>>& blocks) {
blockIndices[blocks[i].get()] = i;
}
- // Use a nonsense value to indicate what has yet to be initialized.
- const Index nonsense = -1;
-
// Initialize the iDoms array. The entry starts with its own index, which is
// used as a guard value in effect (we will never process it, and we will fix
// up this value at the very end). All other nodes start with a nonsense value