+/* Return the return value convention that will be used for the
+ specified type. */
+
+enum return_value_convention
+struct_return_convention (struct gdbarch *gdbarch,
+ struct value *function, struct type *value_type)
+{
+ enum type_code code = TYPE_CODE (value_type);
+
+ if (code == TYPE_CODE_ERROR)
+ error (_("Function return type unknown."));
+
+ /* Probe the architecture for the return-value convention. */
+ return gdbarch_return_value (gdbarch, function, value_type,
+ NULL, NULL, NULL);
+}
+