diff options
Diffstat (limited to 'runtime/utils.h')
-rw-r--r-- | runtime/utils.h | 10 |
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_ |