java: Use build_qualified_type instead of build_type_variant.

gcc/java/ChangeLog

	* builtins.c (putVolatile_builtin): Use build_qualified_type
	instead of build_type_variant.
	(getVolatile_builtin): Likewise.
	(build_classdollar_field): Likewise.

From-SVN: r212389
This commit is contained in:
Mark Wielaard 2014-07-09 10:56:39 +00:00 committed by Mark Wielaard
parent 059345ce40
commit 676c36d870
3 changed files with 16 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2014-07-08 Mark Wielaard <mjw@redhat.com>
* builtins.c (putVolatile_builtin): Use build_qualified_type
instead of build_type_variant.
(getVolatile_builtin): Likewise.
(build_classdollar_field): Likewise.
2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
* jcf-io.c: Adjust.

View File

@ -394,7 +394,8 @@ putVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED,
addr = build_addr_sum (value_type, obj_arg, offset_arg);
addr
= fold_convert (build_pointer_type (build_type_variant (value_type, 0, 1)),
= fold_convert (build_pointer_type (build_qualified_type
(value_type, TYPE_QUAL_VOLATILE)),
addr);
stmt = build_call_expr (builtin_decl_explicit (BUILT_IN_SYNC_SYNCHRONIZE), 0);
@ -418,8 +419,9 @@ getVolatile_builtin (tree method_return_type ATTRIBUTE_UNUSED,
addr = build_addr_sum (method_return_type, obj_arg, offset_arg);
addr
= fold_convert (build_pointer_type (build_type_variant
(method_return_type, 0, 1)), addr);
= fold_convert (build_pointer_type (build_qualified_type
(method_return_type,
TYPE_QUAL_VOLATILE)), addr);
stmt = build_call_expr (builtin_decl_explicit (BUILT_IN_SYNC_SYNCHRONIZE), 0);
tmp = build_decl (BUILTINS_LOCATION, VAR_DECL, NULL, method_return_type);

View File

@ -1067,11 +1067,11 @@ build_classdollar_field (tree type)
decl
= build_decl (input_location,
VAR_DECL, decl_name,
(build_type_variant
(build_qualified_type
(build_pointer_type
(build_type_variant (class_type_node,
/* const */ 1, 0)),
/* const */ 1, 0)));
(build_qualified_type (class_type_node,
TYPE_QUAL_CONST)),
TYPE_QUAL_CONST)));
TREE_STATIC (decl) = 1;
TREE_CONSTANT (decl) = 1;
TREE_READONLY (decl) = 1;