ART: Fixing build breakage.
Caused by Ic654a1fb9c1ae127dde59290bf36a23edb55ca8e.
Change-Id: Ia0c0fbcb6c8b141c5ee30a89ab6bc1c653916698
diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h
index e04bde0..770c45d 100644
--- a/runtime/mirror/dex_cache.h
+++ b/runtime/mirror/dex_cache.h
@@ -35,7 +35,7 @@
class String;
-struct StringDexCachePair {
+struct PACKED(8) StringDexCachePair {
GcRoot<String> string_pointer;
uint32_t string_index;
// The array is initially [ {0,0}, {0,0}, {0,0} ... ]
diff --git a/runtime/utils/dex_cache_arrays_layout-inl.h b/runtime/utils/dex_cache_arrays_layout-inl.h
index 4752a86..c2b2f65 100644
--- a/runtime/utils/dex_cache_arrays_layout-inl.h
+++ b/runtime/utils/dex_cache_arrays_layout-inl.h
@@ -50,7 +50,7 @@
// GcRoot<> alignment is 4, i.e. lower than or equal to the pointer alignment.
static_assert(alignof(GcRoot<mirror::Class>) == 4, "Expecting alignof(GcRoot<>) == 4");
static_assert(alignof(mirror::StringDexCacheType) == 8, "Expecting alignof(StringDexCacheType) == 8");
- return sizeof(mirror::StringDexCacheType);
+ return alignof(mirror::StringDexCacheType);
}
template <typename T>
@@ -100,7 +100,7 @@
}
inline size_t DexCacheArraysLayout::StringsAlignment() const {
- return alignof(uint64_t);
+ return alignof(mirror::StringDexCacheType);
}
inline size_t DexCacheArraysLayout::FieldOffset(uint32_t field_idx) const {