summaryrefslogtreecommitdiff
path: root/runtime/utils.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2016-08-29 17:43:45 -0700
committerAndreas Gampe <agampe@google.com>2016-09-08 10:13:47 -0700
commitbda1d606f2d31086874b68edd9254e3817d8049c (patch)
treedb07417935fe72e99c3da60152e13f0620c7d8d7 /runtime/utils.h
parentd14d515df39cd963179088b8721768f9645243aa (diff)
ART: Detach libart-disassembler from libart
Some more intrusive changes than I would have liked, as long as ART logging is different from libbase logging. Fix up some includes. Bug: 15436106 Bug: 31338270 Test: m test-art-host Change-Id: I9fbe4b85b2d74e079a4981f3aec9af63b163a461
Diffstat (limited to 'runtime/utils.h')
-rw-r--r--runtime/utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/utils.h b/runtime/utils.h
index 2389ce77fc..958f0a35e1 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -386,6 +386,16 @@ inline void FlushInstructionCache(char* begin, char* end) {
__builtin___clear_cache(begin, end);
}
+template <typename T>
+constexpr PointerSize ConvertToPointerSize(T any) {
+ if (any == 4 || any == 8) {
+ return static_cast<PointerSize>(any);
+ } else {
+ LOG(FATAL);
+ UNREACHABLE();
+ }
+}
+
} // namespace art
#endif // ART_RUNTIME_UTILS_H_