ART: Forward-declare AllocatorType (iwyu)
Test: mmma art
Change-Id: I064a1664727dfbed6ae91bde1658c7ba021bcc94
diff --git a/runtime/gc/allocator_type.h b/runtime/gc/allocator_type.h
index 992c32a..cd9f5d4 100644
--- a/runtime/gc/allocator_type.h
+++ b/runtime/gc/allocator_type.h
@@ -24,7 +24,7 @@
// Different types of allocators.
// Those marked with * have fast path entrypoints callable from generated code.
-enum AllocatorType {
+enum AllocatorType : char {
// BumpPointer spaces are currently only used for ZygoteSpace construction.
kAllocatorTypeBumpPointer, // Use global CAS-based BumpPointer allocator. (*)
kAllocatorTypeTLAB, // Use TLAB allocator within BumpPointer space. (*)
diff --git a/runtime/mirror/array-alloc-inl.h b/runtime/mirror/array-alloc-inl.h
index 2ae4cab..eb083f7 100644
--- a/runtime/mirror/array-alloc-inl.h
+++ b/runtime/mirror/array-alloc-inl.h
@@ -25,6 +25,7 @@
#include "base/bit_utils.h"
#include "base/casts.h"
#include "class.h"
+#include "gc/allocator_type.h"
#include "gc/heap-inl.h"
#include "obj_ptr-inl.h"
#include "runtime.h"
diff --git a/runtime/mirror/array.h b/runtime/mirror/array.h
index 1ee4e50..f0397b6 100644
--- a/runtime/mirror/array.h
+++ b/runtime/mirror/array.h
@@ -19,12 +19,15 @@
#include "base/bit_utils.h"
#include "base/enums.h"
-#include "gc/allocator_type.h"
#include "obj_ptr.h"
#include "object.h"
namespace art {
+namespace gc {
+enum AllocatorType : char;
+} // namespace gc
+
template<class T> class Handle;
class Thread;
diff --git a/runtime/mirror/class-alloc-inl.h b/runtime/mirror/class-alloc-inl.h
index d4a532e..03c422f 100644
--- a/runtime/mirror/class-alloc-inl.h
+++ b/runtime/mirror/class-alloc-inl.h
@@ -19,6 +19,7 @@
#include "class-inl.h"
+#include "gc/allocator_type.h"
#include "gc/heap-inl.h"
#include "object-inl.h"
#include "runtime.h"
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index d09b484..f2ba7d0 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -26,7 +26,6 @@
#include "dex/dex_file_types.h"
#include "dex/modifiers.h"
#include "dex/primitive.h"
-#include "gc/allocator_type.h"
#include "object.h"
#include "object_array.h"
#include "read_barrier_option.h"
@@ -38,6 +37,10 @@
class TypeList;
} // namespace dex
+namespace gc {
+enum AllocatorType : char;
+} // namespace gc
+
namespace hiddenapi {
class AccessContext;
} // namespace hiddenapi
diff --git a/runtime/mirror/string-alloc-inl.h b/runtime/mirror/string-alloc-inl.h
index 7215c39..32b6bb4 100644
--- a/runtime/mirror/string-alloc-inl.h
+++ b/runtime/mirror/string-alloc-inl.h
@@ -24,6 +24,7 @@
#include "base/bit_utils.h"
#include "class.h"
#include "class_root.h"
+#include "gc/allocator_type.h"
#include "gc/heap-inl.h"
#include "obj_ptr.h"
#include "runtime.h"
diff --git a/runtime/mirror/string.h b/runtime/mirror/string.h
index c98aa6b..6b7dfd5 100644
--- a/runtime/mirror/string.h
+++ b/runtime/mirror/string.h
@@ -18,13 +18,16 @@
#define ART_RUNTIME_MIRROR_STRING_H_
#include "base/bit_utils.h"
-#include "gc/allocator_type.h"
#include "class.h"
#include "object.h"
#include "runtime_globals.h"
namespace art {
+namespace gc {
+enum AllocatorType : char;
+} // namespace gc
+
template<class T> class Handle;
template<class MirrorType> class ObjPtr;
struct StringOffsets;