From b7bb6a9832958abb076dcd9207c7457a7bec6201 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Thu, 14 Oct 2021 12:32:43 +0100 Subject: Add boiler plate for TyTy::ClosureType This adds all the nesecary boiler plate to introduce the ClosureType. More work is needed to be make this actually useable for type resolution. Addresses #195 --- gcc/rust/backend/rust-compile-context.h | 2 ++ gcc/rust/backend/rust-compile-tyty.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'gcc/rust/backend') diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h index 7a4344e..0da2198 100644 --- a/gcc/rust/backend/rust-compile-context.h +++ b/gcc/rust/backend/rust-compile-context.h @@ -661,6 +661,8 @@ public: ctx->insert_compiled_type (type.get_ty_ref (), named_struct, &type); } + void visit (TyTy::ClosureType &type) override { gcc_unreachable (); } + private: TyTyResolveCompile (Context *ctx, bool trait_object_mode) : ctx (ctx), trait_object_mode (trait_object_mode), translated (nullptr) diff --git a/gcc/rust/backend/rust-compile-tyty.h b/gcc/rust/backend/rust-compile-tyty.h index 40b297c..c544a45 100644 --- a/gcc/rust/backend/rust-compile-tyty.h +++ b/gcc/rust/backend/rust-compile-tyty.h @@ -239,6 +239,8 @@ public: void visit (TyTy::DynamicObjectType &) override { gcc_unreachable (); } + void visit (TyTy::ClosureType &) override { gcc_unreachable (); } + private: TyTyCompile (::Backend *backend) : backend (backend), translated (nullptr), -- cgit v1.1