diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-10-21 13:01:43 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-12-04 21:00:44 +0000 |
commit | d07cae9e4b4402a19c5a1371c09d899002362d5d (patch) | |
tree | b293b2b25fea17f768a31579acbe4c6f83a74cb3 /gcc/rust/resolve/rust-name-resolver.h | |
parent | 22329b03a6e0a3381d907745205012cf290b3c2a (diff) | |
download | gcc-d07cae9e4b4402a19c5a1371c09d899002362d5d.zip gcc-d07cae9e4b4402a19c5a1371c09d899002362d5d.tar.gz gcc-d07cae9e4b4402a19c5a1371c09d899002362d5d.tar.bz2 |
Get rid of make builtin macro
This macro is a mess and a helper method is much better for this case.
Diffstat (limited to 'gcc/rust/resolve/rust-name-resolver.h')
-rw-r--r-- | gcc/rust/resolve/rust-name-resolver.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/rust/resolve/rust-name-resolver.h b/gcc/rust/resolve/rust-name-resolver.h index 3716bb0..6c2e5fd 100644 --- a/gcc/rust/resolve/rust-name-resolver.h +++ b/gcc/rust/resolve/rust-name-resolver.h @@ -30,8 +30,9 @@ namespace Resolver { class Rib { public: - // Rust uses local_def_ids assigned by def_collector on the AST - // lets use NodeId instead + // FIXME + // Rust uses local_def_ids assigned by def_collector on the AST. Consider + // moving to a local-def-id Rib (CrateNum crateNum, NodeId node_id); // this takes the relative paths of items within a compilation unit for lookup @@ -59,7 +60,6 @@ private: std::map<NodeId, CanonicalPath> reverse_path_mappings; std::map<NodeId, Location> decls_within_rib; std::map<NodeId, std::set<NodeId>> references; - Analysis::Mappings *mappings; }; class Scope @@ -172,6 +172,7 @@ private: Resolver (); void generate_builtins (); + void setup_builtin (const std::string &name, TyTy::BaseType *tyty); Analysis::Mappings *mappings; TypeCheckContext *tyctx; |