summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/test_dex_file_builder_test.cc3
-rw-r--r--compiler/utils/type_reference.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler/utils/test_dex_file_builder_test.cc b/compiler/utils/test_dex_file_builder_test.cc
index da4ac798c7..922f8b1dfa 100644
--- a/compiler/utils/test_dex_file_builder_test.cc
+++ b/compiler/utils/test_dex_file_builder_test.cc
@@ -62,7 +62,8 @@ TEST(TestDexFileBuilderTest, SimpleTest) {
};
ASSERT_EQ(arraysize(expected_types), dex_file->NumTypeIds());
for (size_t i = 0; i != arraysize(expected_types); ++i) {
- EXPECT_STREQ(expected_types[i], dex_file->GetTypeDescriptor(dex_file->GetTypeId(i))) << i;
+ EXPECT_STREQ(expected_types[i],
+ dex_file->GetTypeDescriptor(dex_file->GetTypeId(dex::TypeIndex(i)))) << i;
}
ASSERT_EQ(1u, dex_file->NumFieldIds());
diff --git a/compiler/utils/type_reference.h b/compiler/utils/type_reference.h
index d0c1656836..a0fa1a4a63 100644
--- a/compiler/utils/type_reference.h
+++ b/compiler/utils/type_reference.h
@@ -20,6 +20,7 @@
#include <stdint.h>
#include "base/logging.h"
+#include "dex_file_types.h"
#include "string_reference.h"
namespace art {
@@ -28,10 +29,10 @@ class DexFile;
// A type is located by its DexFile and the string_ids_ table index into that DexFile.
struct TypeReference {
- TypeReference(const DexFile* file, uint32_t index) : dex_file(file), type_index(index) { }
+ TypeReference(const DexFile* file, dex::TypeIndex index) : dex_file(file), type_index(index) { }
const DexFile* dex_file;
- uint32_t type_index;
+ dex::TypeIndex type_index;
};
// Compare the actual referenced type names. Used for type reference deduplication.