diff options
author | David Faust <david.faust@oracle.com> | 2021-11-15 11:17:26 -0800 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2021-11-16 13:04:58 -0800 |
commit | b52a68d2d8676ea378f0fbb6726639cc80402542 (patch) | |
tree | fa70c52eb6f879864fa76908a2cf670b50d88e48 /gcc/rust/backend/rust-compile-context.h | |
parent | 7a751f354a91a8459b877c60a5e5d78203aeb3ce (diff) | |
download | gcc-b52a68d2d8676ea378f0fbb6726639cc80402542.zip gcc-b52a68d2d8676ea378f0fbb6726639cc80402542.tar.gz gcc-b52a68d2d8676ea378f0fbb6726639cc80402542.tar.bz2 |
Replace Bexpression with GCC tree
Diffstat (limited to 'gcc/rust/backend/rust-compile-context.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-context.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h index 82c02f8..35ea012 100644 --- a/gcc/rust/backend/rust-compile-context.h +++ b/gcc/rust/backend/rust-compile-context.h @@ -210,12 +210,9 @@ public: return true; } - void insert_const_decl (HirId id, ::Bexpression *expr) - { - compiled_consts[id] = expr; - } + void insert_const_decl (HirId id, ::tree expr) { compiled_consts[id] = expr; } - bool lookup_const_decl (HirId id, ::Bexpression **expr) + bool lookup_const_decl (HirId id, ::tree *expr) { auto it = compiled_consts.find (id); if (it == compiled_consts.end ()) @@ -249,7 +246,7 @@ public: void push_type (::tree t) { type_decls.push_back (t); } void push_var (::Bvariable *v) { var_decls.push_back (v); } - void push_const (::Bexpression *c) { const_decls.push_back (c); } + void push_const (::tree c) { const_decls.push_back (c); } void push_function (::Bfunction *f) { func_decls.push_back (f); } void write_to_backend () @@ -322,9 +319,9 @@ private: // state std::vector<fncontext> fn_stack; std::map<HirId, ::Bvariable *> compiled_var_decls; - std::map<HirId, ::tree > compiled_type_map; + std::map<HirId, tree> compiled_type_map; std::map<HirId, ::Bfunction *> compiled_fn_map; - std::map<HirId, ::Bexpression *> compiled_consts; + std::map<HirId, tree> compiled_consts; std::map<HirId, ::Blabel *> compiled_labels; std::vector<::std::vector<Bstatement *>> statements; std::vector<::Bblock *> scope_stack; @@ -337,7 +334,7 @@ private: // To GCC middle-end std::vector<tree> type_decls; std::vector<::Bvariable *> var_decls; - std::vector<::Bexpression *> const_decls; + std::vector<tree> const_decls; std::vector<::Bfunction *> func_decls; }; |