aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r--gcc/rust/backend/rust-compile-context.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-context.cc b/gcc/rust/backend/rust-compile-context.cc
index 463ac27..cb2addf6 100644
--- a/gcc/rust/backend/rust-compile-context.cc
+++ b/gcc/rust/backend/rust-compile-context.cc
@@ -62,9 +62,6 @@ Context::type_hasher (tree type)
hstate.add_object (record_name_hash);
}
- if (TREE_TYPE (type))
- hstate.add_object (TYPE_HASH (TREE_TYPE (type)));
-
for (tree t = TYPE_ATTRIBUTES (type); t; t = TREE_CHAIN (t))
/* Just the identifier is adequate to distinguish. */
hstate.add_object (IDENTIFIER_HASH_VALUE (TREE_PURPOSE (t)));
@@ -128,6 +125,16 @@ Context::type_hasher (tree type)
}
break;
+ case BOOLEAN_TYPE:
+ break;
+
+ case REFERENCE_TYPE:
+ case POINTER_TYPE: {
+ hashval_t type_hash = type_hasher (TREE_TYPE (type));
+ hstate.add_object (type_hash);
+ }
+ break;
+
default:
break;
}