diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-02-16 15:40:28 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-03-01 10:35:07 +0000 |
commit | 9af2ae0ff91535da104db0d3828d863770439fad (patch) | |
tree | 57b375ba818f22c70066c87a4d9c2a1c1b78f69e /gcc/rust/backend/rust-compile-implitem.h | |
parent | 06bb1d6542a9d07f4d866613a5b039be7bcb5f95 (diff) | |
download | gcc-9af2ae0ff91535da104db0d3828d863770439fad.zip gcc-9af2ae0ff91535da104db0d3828d863770439fad.tar.gz gcc-9af2ae0ff91535da104db0d3828d863770439fad.tar.bz2 |
Support Generic arguments to Structs
This removes StructFieldType from the TyTy base as it is not a type that
can be unified against.
It adds in a substition mapper implementation which will likely change
over time when this this support is extended over to Functions and
TupleStructs.
Note generic argument binding is not supported as part of this yet.
Fixes #235
Diffstat (limited to 'gcc/rust/backend/rust-compile-implitem.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-implitem.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-implitem.h b/gcc/rust/backend/rust-compile-implitem.h index 3da269a..8018367 100644 --- a/gcc/rust/backend/rust-compile-implitem.h +++ b/gcc/rust/backend/rust-compile-implitem.h @@ -50,7 +50,7 @@ public: ::Btype *type = TyTyResolveCompile::compile (ctx, resolved_type); Bexpression *value = CompileExpr::Compile (constant.get_expr (), ctx); - std::string ident = self->as_string () + "::" + constant.get_identifier (); + std::string ident = self->get_name () + "::" + constant.get_identifier (); Bexpression *const_expr = ctx->get_backend ()->named_constant_expression ( type, constant.get_identifier (), value, constant.get_locus ()); @@ -95,7 +95,7 @@ public: unsigned int flags = 0; std::string fn_identifier - = self->as_string () + "::" + function.function_name; + = self->get_name () + "::" + function.function_name; // if its the main fn or pub visibility mark its as DECL_PUBLIC // please see https://github.com/Rust-GCC/gccrs/pull/137 @@ -259,7 +259,7 @@ public: unsigned int flags = 0; std::string fn_identifier - = self->as_string () + "::" + method.get_method_name (); + = self->get_name () + "::" + method.get_method_name (); // if its the main fn or pub visibility mark its as DECL_PUBLIC // please see https://github.com/Rust-GCC/gccrs/pull/137 |