jcf-parse.c (get_constant): Set TREE_TYPE for string constants.

�
	* jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
	(HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.

From-SVN: r24346
This commit is contained in:
Per Bothner 1998-12-16 17:01:53 +00:00 committed by Per Bothner
parent 0252081c1a
commit f868ca8f89
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Wed Dec 16 14:42:19 1998 Per Bothner <bothner@cygnus.com>
* jcf-parse.c (get_constant): Set TREE_TYPE for string constants.
(HANDLE_CONSTANTVALUE): If flag_emit_class_files, call get_constant.
1998-12-16 Tom Tromey <tromey@cygnus.com>
* parse-scan.y (qualified_name): Use correct sprintf format.

View File

@ -129,7 +129,7 @@ set_source_filename (jcf, index)
#define HANDLE_CONSTANTVALUE(INDEX) \
{ tree constant; int index = INDEX; \
if (JPOOL_TAG (jcf, index) == CONSTANT_String) { \
if (! flag_emit_class_files && JPOOL_TAG (jcf, index) == CONSTANT_String) { \
tree name = get_name_constant (jcf, JPOOL_USHORT1 (jcf, index)); \
constant = build_utf8_ref (name); \
} \
@ -312,6 +312,7 @@ get_constant (jcf, index)
}
value = make_node (STRING_CST);
TREE_TYPE (value) = build_pointer_type (string_type_node);
TREE_STRING_LENGTH (value) = 2 * str_len;
TREE_STRING_POINTER (value)
= obstack_alloc (expression_obstack, 2 * str_len);