1542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe/* 2542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * Copyright (C) 2016 The Android Open Source Project 3542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * 4542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * Licensed under the Apache License, Version 2.0 (the "License"); 5542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * you may not use this file except in compliance with the License. 6542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * You may obtain a copy of the License at 7542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * 8542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * http://www.apache.org/licenses/LICENSE-2.0 9542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * 10542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * Unless required by applicable law or agreed to in writing, software 11542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * distributed under the License is distributed on an "AS IS" BASIS, 12542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * See the License for the specific language governing permissions and 14542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe * limitations under the License. 15542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe */ 16542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe 17542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe#ifndef ART_RUNTIME_BASE_ENUMS_H_ 18542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe#define ART_RUNTIME_BASE_ENUMS_H_ 19542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe 20542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe#include <cstddef> 21542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe#include <ostream> 22542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe 23542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampenamespace art { 24542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe 25542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampeenum class PointerSize : size_t { 26542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe k32 = 4, 27542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe k64 = 8 28542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe}; 29542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampestd::ostream& operator<<(std::ostream& os, const PointerSize& rhs); 30542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe 31542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampestatic constexpr PointerSize kRuntimePointerSize = sizeof(void*) == 8U 32542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe ? PointerSize::k64 33542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe : PointerSize::k32; 34542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe 35542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe} // namespace art 36542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe 37542451cc546779f5c67840e105c51205a1b0a8fdAndreas Gampe#endif // ART_RUNTIME_BASE_ENUMS_H_ 38