ART: Forward-declare SuspendReason in thread.h
Reduce transitive includes, iwyu.
Test: mmma art
Change-Id: Ief9708af95db988f2b77accdd144b3d90e4248d2
diff --git a/runtime/suspend_reason.h b/runtime/suspend_reason.h
index af2be10..9881b88 100644
--- a/runtime/suspend_reason.h
+++ b/runtime/suspend_reason.h
@@ -22,7 +22,7 @@
namespace art {
// The various reasons that we might be suspending a thread.
-enum class SuspendReason {
+enum class SuspendReason : char {
// Suspending for internal reasons (e.g. GC, stack trace, etc.).
// TODO Split this into more descriptive sections.
kInternal,
diff --git a/runtime/thread-inl.h b/runtime/thread-inl.h
index 00f882e..0404ac9 100644
--- a/runtime/thread-inl.h
+++ b/runtime/thread-inl.h
@@ -27,6 +27,7 @@
#include "jni/jni_env_ext.h"
#include "managed_stack-inl.h"
#include "obj_ptr.h"
+#include "suspend_reason.h"
#include "thread-current-inl.h"
#include "thread_pool.h"
diff --git a/runtime/thread.h b/runtime/thread.h
index 7c8ad24..4991566 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -41,7 +41,6 @@
#include "read_barrier_config.h"
#include "runtime_globals.h"
#include "runtime_stats.h"
-#include "suspend_reason.h"
#include "thread_state.h"
class BacktraceMap;
@@ -96,6 +95,7 @@
class ShadowFrame;
class SingleStepControl;
class StackedShadowFrameRecord;
+enum class SuspendReason : char;
class Thread;
class ThreadList;
enum VisitRootFlags : uint8_t;