aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-name-resolver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/resolve/rust-name-resolver.cc')
-rw-r--r--gcc/rust/resolve/rust-name-resolver.cc50
1 files changed, 25 insertions, 25 deletions
diff --git a/gcc/rust/resolve/rust-name-resolver.cc b/gcc/rust/resolve/rust-name-resolver.cc
index e87ac49..333e7ba 100644
--- a/gcc/rust/resolve/rust-name-resolver.cc
+++ b/gcc/rust/resolve/rust-name-resolver.cc
@@ -274,10 +274,10 @@ Scope::decl_was_declared_here (NodeId def) const
Resolver::Resolver ()
: mappings (Analysis::Mappings::get ()), tyctx (TypeCheckContext::get ()),
- name_scope (Scope (mappings->get_current_crate ())),
- type_scope (Scope (mappings->get_current_crate ())),
- label_scope (Scope (mappings->get_current_crate ())),
- macro_scope (Scope (mappings->get_current_crate ())),
+ name_scope (Scope (mappings.get_current_crate ())),
+ type_scope (Scope (mappings.get_current_crate ())),
+ label_scope (Scope (mappings.get_current_crate ())),
+ macro_scope (Scope (mappings.get_current_crate ())),
global_type_node_id (UNKNOWN_NODEID), unit_ty_node_id (UNKNOWN_NODEID)
{
generate_builtins ();
@@ -383,34 +383,34 @@ void
Resolver::generate_builtins ()
{
auto u8
- = new TyTy::UintType (mappings->get_next_hir_id (), TyTy::UintType::U8);
+ = new TyTy::UintType (mappings.get_next_hir_id (), TyTy::UintType::U8);
auto u16
- = new TyTy::UintType (mappings->get_next_hir_id (), TyTy::UintType::U16);
+ = new TyTy::UintType (mappings.get_next_hir_id (), TyTy::UintType::U16);
auto u32
- = new TyTy::UintType (mappings->get_next_hir_id (), TyTy::UintType::U32);
+ = new TyTy::UintType (mappings.get_next_hir_id (), TyTy::UintType::U32);
auto u64
- = new TyTy::UintType (mappings->get_next_hir_id (), TyTy::UintType::U64);
+ = new TyTy::UintType (mappings.get_next_hir_id (), TyTy::UintType::U64);
auto u128
- = new TyTy::UintType (mappings->get_next_hir_id (), TyTy::UintType::U128);
- auto i8 = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I8);
+ = new TyTy::UintType (mappings.get_next_hir_id (), TyTy::UintType::U128);
+ auto i8 = new TyTy::IntType (mappings.get_next_hir_id (), TyTy::IntType::I8);
auto i16
- = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I16);
+ = new TyTy::IntType (mappings.get_next_hir_id (), TyTy::IntType::I16);
auto i32
- = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I32);
+ = new TyTy::IntType (mappings.get_next_hir_id (), TyTy::IntType::I32);
auto i64
- = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I64);
+ = new TyTy::IntType (mappings.get_next_hir_id (), TyTy::IntType::I64);
auto i128
- = new TyTy::IntType (mappings->get_next_hir_id (), TyTy::IntType::I128);
- auto rbool = new TyTy::BoolType (mappings->get_next_hir_id ());
+ = new TyTy::IntType (mappings.get_next_hir_id (), TyTy::IntType::I128);
+ auto rbool = new TyTy::BoolType (mappings.get_next_hir_id ());
auto f32
- = new TyTy::FloatType (mappings->get_next_hir_id (), TyTy::FloatType::F32);
+ = new TyTy::FloatType (mappings.get_next_hir_id (), TyTy::FloatType::F32);
auto f64
- = new TyTy::FloatType (mappings->get_next_hir_id (), TyTy::FloatType::F64);
- auto usize = new TyTy::USizeType (mappings->get_next_hir_id ());
- auto isize = new TyTy::ISizeType (mappings->get_next_hir_id ());
- auto char_tyty = new TyTy::CharType (mappings->get_next_hir_id ());
- auto str = new TyTy::StrType (mappings->get_next_hir_id ());
- auto never = new TyTy::NeverType (mappings->get_next_hir_id ());
+ = new TyTy::FloatType (mappings.get_next_hir_id (), TyTy::FloatType::F64);
+ auto usize = new TyTy::USizeType (mappings.get_next_hir_id ());
+ auto isize = new TyTy::ISizeType (mappings.get_next_hir_id ());
+ auto char_tyty = new TyTy::CharType (mappings.get_next_hir_id ());
+ auto str = new TyTy::StrType (mappings.get_next_hir_id ());
+ auto never = new TyTy::NeverType (mappings.get_next_hir_id ());
setup_builtin ("u8", u8);
setup_builtin ("u16", u16);
@@ -433,7 +433,7 @@ Resolver::generate_builtins ()
// unit type ()
TyTy::TupleType *unit_tyty
- = TyTy::TupleType::get_unit_type (mappings->get_next_hir_id ());
+ = TyTy::TupleType::get_unit_type (mappings.get_next_hir_id ());
std::vector<std::unique_ptr<AST::Type> > elems;
AST::TupleType *unit_type
= new AST::TupleType (std::move (elems), BUILTINS_LOCATION);
@@ -455,8 +455,8 @@ Resolver::setup_builtin (const std::string &name, TyTy::BaseType *tyty)
= new AST::TypePath (::std::move (segs), BUILTINS_LOCATION, false);
builtins.push_back (builtin_type);
tyctx->insert_builtin (tyty->get_ref (), builtin_type->get_node_id (), tyty);
- mappings->insert_node_to_hir (builtin_type->get_node_id (), tyty->get_ref ());
- mappings->insert_canonical_path (
+ mappings.insert_node_to_hir (builtin_type->get_node_id (), tyty->get_ref ());
+ mappings.insert_canonical_path (
builtin_type->get_node_id (),
CanonicalPath::new_seg (builtin_type->get_node_id (), name));
}