aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-context.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-03-04 15:14:12 +0000
committerPhilip Herron <philip.herron@embecosm.com>2022-03-07 12:16:18 +0000
commit7820ff8b8b14e1309aade205e50ef30bb08cb3e5 (patch)
tree33ca33f20795707b58b694fab16039d0c2c7374a /gcc/rust/backend/rust-compile-context.h
parente00311aa9aabf447f27031cc5ffc114c5fbd8551 (diff)
downloadgcc-7820ff8b8b14e1309aade205e50ef30bb08cb3e5.zip
gcc-7820ff8b8b14e1309aade205e50ef30bb08cb3e5.tar.gz
gcc-7820ff8b8b14e1309aade205e50ef30bb08cb3e5.tar.bz2
Remove old unused code pass this was too generic
This now uses the TREE_USED fields on GCC tree's to track the usage of VAR_DECLS, PARM_DECLS and CONST_DECLS. The code does a pass over the body and parameters of functions as a lint pass. Fixes #676
Diffstat (limited to 'gcc/rust/backend/rust-compile-context.h')
-rw-r--r--gcc/rust/backend/rust-compile-context.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h
index 3fefd8d..4bade5c 100644
--- a/gcc/rust/backend/rust-compile-context.h
+++ b/gcc/rust/backend/rust-compile-context.h
@@ -307,6 +307,11 @@ public:
return mangler.mangle_item (ty, path);
}
+ std::vector<tree> &get_type_decls () { return type_decls; }
+ std::vector<::Bvariable *> &get_var_decls () { return var_decls; }
+ std::vector<tree> &get_const_decls () { return const_decls; }
+ std::vector<tree> &get_func_decls () { return func_decls; }
+
private:
::Backend *backend;
Resolver::Resolver *resolver;