aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-backend.h
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2021-11-15 11:27:35 -0800
committerDavid Faust <david.faust@oracle.com>2021-11-16 13:00:32 -0800
commit97c98deec7d4c698d7b8ee8a4e56888d5d85b8bd (patch)
treeae5b3ebbe82642c8f9398505c61e64ca387adbe5 /gcc/rust/rust-backend.h
parent5514d9cec51d5ec7cc30dd6cdbfadfdddbe0aab3 (diff)
downloadgcc-97c98deec7d4c698d7b8ee8a4e56888d5d85b8bd.zip
gcc-97c98deec7d4c698d7b8ee8a4e56888d5d85b8bd.tar.gz
gcc-97c98deec7d4c698d7b8ee8a4e56888d5d85b8bd.tar.bz2
rust-backend.h: remove unused function prototypes
These functions are holdovers from the original port from the Go frontend for Rust. They aren't used anywhere, so delete them from rust-backend.h and rust-gcc.cc. (set_)placeholder_xxx_type () (is_)circular_pointer_type ()
Diffstat (limited to 'gcc/rust/rust-backend.h')
-rw-r--r--gcc/rust/rust-backend.h83
1 files changed, 0 insertions, 83 deletions
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h
index 705f7dc..340284f 100644
--- a/gcc/rust/rust-backend.h
+++ b/gcc/rust/rust-backend.h
@@ -229,66 +229,6 @@ public:
// Get an array type.
virtual Btype *array_type (Btype *element_type, Bexpression *length) = 0;
- // Create a placeholder pointer type. This is used for a named
- // pointer type, since in Go a pointer type may refer to itself.
- // NAME is the name of the type, and the location is where the named
- // type is defined. This function is also used for unnamed function
- // types with multiple results, in which case the type has no name
- // and NAME will be empty. FOR_FUNCTION is true if this is for a C
- // pointer to function type. A Go func type is represented as a
- // pointer to a struct, and the first field of the struct is a C
- // pointer to function. The return value will later be passed as
- // the first parameter to set_placeholder_pointer_type or
- // set_placeholder_function_type.
- virtual Btype *placeholder_pointer_type (const std::string &name, Location,
- bool for_function)
- = 0;
-
- // Fill in a placeholder pointer type as a pointer. This takes a
- // type returned by placeholder_pointer_type and arranges for it to
- // point to the type that TO_TYPE points to (that is, PLACEHOLDER
- // becomes the same type as TO_TYPE). Returns true on success,
- // false on failure.
- virtual bool set_placeholder_pointer_type (Btype *placeholder, Btype *to_type)
- = 0;
-
- // Fill in a placeholder pointer type as a function. This takes a
- // type returned by placeholder_pointer_type and arranges for it to
- // become a real Go function type (which corresponds to a C/C++
- // pointer to function type). FT will be something returned by the
- // function_type method. Returns true on success, false on failure.
- virtual bool set_placeholder_function_type (Btype *placeholder, Btype *ft)
- = 0;
-
- // Create a placeholder struct type. This is used for a named
- // struct type, as with placeholder_pointer_type. It is also used
- // for interface types, in which case NAME will be the empty string.
- virtual Btype *placeholder_struct_type (const std::string &name, Location)
- = 0;
-
- // Fill in a placeholder struct type. This takes a type returned by
- // placeholder_struct_type and arranges for it to become a real
- // struct type. The parameter is as for struct_type. Returns true
- // on success, false on failure.
- virtual bool
- set_placeholder_struct_type (Btype *placeholder,
- const std::vector<Btyped_identifier> &fields)
- = 0;
-
- // Create a placeholder array type. This is used for a named array
- // type, as with placeholder_pointer_type, to handle cases like
- // type A []*A.
- virtual Btype *placeholder_array_type (const std::string &name, Location) = 0;
-
- // Fill in a placeholder array type. This takes a type returned by
- // placeholder_array_type and arranges for it to become a real array
- // type. The parameters are as for array_type. Returns true on
- // success, false on failure.
- virtual bool set_placeholder_array_type (Btype *placeholder,
- Btype *element_type,
- Bexpression *length)
- = 0;
-
// Return a named version of a type. The location is the location
// of the type definition. This will not be called for a type
// created via placeholder_pointer_type, placeholder_struct_type, or
@@ -296,29 +236,6 @@ public:
// struct, or array type in a case like "type P *byte; type Q P".)
virtual Btype *named_type (const std::string &name, Btype *, Location) = 0;
- // Create a marker for a circular pointer type. Go pointer and
- // function types can refer to themselves in ways that are not
- // permitted in C/C++. When a circular type is found, this function
- // is called for the circular reference. This permits the backend
- // to decide how to handle such a type. PLACEHOLDER is the
- // placeholder type which has already been created; if the backend
- // is prepared to handle a circular pointer type, it may simply
- // return PLACEHOLDER. FOR_FUNCTION is true if this is for a
- // function type.
- //
- // For "type P *P" the sequence of calls will be
- // bt1 = placeholder_pointer_type();
- // bt2 = circular_pointer_type(bt1, false);
- // set_placeholder_pointer_type(bt1, bt2);
- virtual Btype *circular_pointer_type (Btype *placeholder, bool for_function)
- = 0;
-
- // Return whether the argument could be a special type created by
- // circular_pointer_type. This is used to introduce explicit type
- // conversions where needed. If circular_pointer_type returns its
- // PLACEHOLDER parameter, this may safely always return false.
- virtual bool is_circular_pointer_type (Btype *) = 0;
-
// Return the size of a type.
virtual int64_t type_size (Btype *) = 0;