summaryrefslogtreecommitdiff
path: root/runtime/type_reference.h
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2017-06-23 01:39:45 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-06-23 01:39:45 +0000
commitfc5a157710402f89c46f7058d97c44caae45e48d (patch)
treee734583c07eddeca3f6afafbdbd999b43d9e3b35 /runtime/type_reference.h
parentcba0077020d4fd555e879818701e8a955801c0e9 (diff)
parent53c6d102a04c4b9afefe6cacd7669e96bbec6b7d (diff)
Merge "Add support for generating boot image profile" am: 8046f3fb50 am: b93c9d4187 am: 9984845f41
am: 53c6d102a0 Change-Id: I60f2225b1ce6c7695ae18cb6d8cfaed9276e1f13
Diffstat (limited to 'runtime/type_reference.h')
-rw-r--r--runtime/type_reference.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/type_reference.h b/runtime/type_reference.h
index b7e964b3ad3..c44019dde35 100644
--- a/runtime/type_reference.h
+++ b/runtime/type_reference.h
@@ -37,6 +37,15 @@ struct TypeReference {
dex::TypeIndex type_index;
};
+struct TypeReferenceComparator {
+ bool operator()(TypeReference mr1, TypeReference mr2) const {
+ if (mr1.dex_file != mr2.dex_file) {
+ return mr1.dex_file < mr2.dex_file;
+ }
+ return mr1.type_index < mr2.type_index;
+ }
+};
+
// Compare the actual referenced type names. Used for type reference deduplication.
struct TypeReferenceValueComparator {
bool operator()(TypeReference tr1, TypeReference tr2) const {