aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-item.h
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2021-08-12 13:45:15 +0200
committerMarc <dkm@kataplop.net>2021-08-18 22:59:48 +0200
commited9a473c741f85685e8d9160155c16a92c010ca7 (patch)
tree9e1a7ec2b211376e6caf64c112c47da5acb3cb2d /gcc/rust/backend/rust-compile-item.h
parentfd1d9c1af7c7afa43ebac162f9427420ea2314ff (diff)
downloadgcc-ed9a473c741f85685e8d9160155c16a92c010ca7.zip
gcc-ed9a473c741f85685e8d9160155c16a92c010ca7.tar.gz
gcc-ed9a473c741f85685e8d9160155c16a92c010ca7.tar.bz2
typecheck + backend: add module support
Typechecking and backend for Modules. ref #432 Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-item.h')
-rw-r--r--gcc/rust/backend/rust-compile-item.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-item.h b/gcc/rust/backend/rust-compile-item.h
index 719d51c..8b36289 100644
--- a/gcc/rust/backend/rust-compile-item.h
+++ b/gcc/rust/backend/rust-compile-item.h
@@ -301,6 +301,12 @@ public:
}
}
+ void visit (HIR::ModuleBodied &module) override
+ {
+ for (auto &item : module.get_items ())
+ CompileItem::compile (item.get (), ctx, compile_fns);
+ }
+
private:
CompileItem (Context *ctx, bool compile_fns, TyTy::BaseType *concrete)
: HIRCompileBase (ctx), compile_fns (compile_fns), concrete (concrete)