summaryrefslogtreecommitdiff
path: root/src/analysis/cfg.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/cfg.h')
-rw-r--r--src/analysis/cfg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/analysis/cfg.h b/src/analysis/cfg.h
index ff9b05849..cd1a60815 100644
--- a/src/analysis/cfg.h
+++ b/src/analysis/cfg.h
@@ -73,6 +73,8 @@ struct CFG {
reverse_iterator rbegin() const { return blocks.rbegin(); }
reverse_iterator rend() const { return blocks.rend(); }
+ const BasicBlock& operator[](size_t i) const { return *(begin() + i); }
+
static CFG fromFunction(Function* func);
void print(std::ostream& os, Module* wasm = nullptr) const;