+2014-12-12 Tom Tromey <tromey@redhat.com>
+
+ * gdbtypes.h (make_unqualified_type): Declare.
+ * gdbtypes.c (make_unqualified_type): New function.
+
2014-12-12 Tom Tromey <tromey@redhat.com>
* ui-file.h (ui_file_write_for_put): Declare.
NULL);
}
+/* Make a type without const, volatile, or restrict. */
+
+struct type *
+make_unqualified_type (struct type *type)
+{
+ return make_qualified_type (type,
+ (TYPE_INSTANCE_FLAGS (type)
+ & ~(TYPE_INSTANCE_FLAG_CONST
+ | TYPE_INSTANCE_FLAG_VOLATILE
+ | TYPE_INSTANCE_FLAG_RESTRICT)),
+ NULL);
+}
+
/* Replace the contents of ntype with the type *type. This changes the
contents, rather than the pointer for TYPE_MAIN_TYPE (ntype); thus
the changes are propogated to all types in the TYPE_CHAIN.
extern struct type *make_restrict_type (struct type *);
+extern struct type *make_unqualified_type (struct type *);
+
extern void replace_type (struct type *, struct type *);
extern int address_space_name_to_int (struct gdbarch *, char *);