summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-14 17:41:29 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-14 17:41:29 +0800
commitee8f1c7315b135b0b6d3393222aa8f9d47da3ec0 (patch)
tree1fce09a77ac014c1a2c3521f0d4971cff4db6ab7 /src/main.cpp
parent31b18e35522708cac4345f1817c07f9784d175df (diff)
downloadmrust-ee8f1c7315b135b0b6d3393222aa8f9d47da3ec0.tar.gz
HIR Expand - Add annotation pass
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1ca3f5e9..453a420a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -189,6 +189,11 @@ int main(int argc, char *argv[])
CompilePhaseV("Typecheck Expressions", [&]() {
Typecheck_Expressions(*hir_crate);
});
+ // === HIR Expansion ===
+ // Annotate how each node's result is used
+ CompilePhaseV("Expand HIR Annotate", [&]() {
+ HIR_Expand_AnnotateUsage(*hir_crate);
+ });
// - Now that all types are known, closures can be desugared
CompilePhaseV("Expand HIR Closures", [&]() {
HIR_Expand_Closures(*hir_crate);
@@ -206,7 +211,6 @@ int main(int argc, char *argv[])
return 0;
}
- // Expand closures into items
// Lower expressions into MIR
CompilePhaseV("Lower MIR", [&]() {
HIR_GenerateMIR(*hir_crate);