aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/verify-glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/verify-glue.c')
-rw-r--r--gcc/java/verify-glue.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/java/verify-glue.c b/gcc/java/verify-glue.c
index b2cd915..5d480e8 100644
--- a/gcc/java/verify-glue.c
+++ b/gcc/java/verify-glue.c
@@ -1,5 +1,5 @@
/* Glue to interface gcj with bytecode verifier.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
@@ -385,6 +385,21 @@ vfy_null_type (void)
return TYPE_NULL;
}
+bool
+vfy_class_has_field (vfy_jclass klass, vfy_string name,
+ vfy_string signature)
+{
+ tree field = TYPE_FIELDS (klass);
+ while (field != NULL_TREE)
+ {
+ if (DECL_NAME (field) == name
+ && build_java_signature (TREE_TYPE (field)) == signature)
+ return true;
+ field = TREE_CHAIN (field);
+ }
+ return false;
+}
+
int
vfy_fail (const char *message, int pc, vfy_jclass ignore1 ATTRIBUTE_UNUSED,
vfy_method *ignore2 ATTRIBUTE_UNUSED)