1 /* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef ART_COMPILER_DRIVER_COMPILER_OPTIONS_MAP_H_ 18 #define ART_COMPILER_DRIVER_COMPILER_OPTIONS_MAP_H_ 19 20 #include <string> 21 #include <vector> 22 23 #include "base/compiler_filter.h" 24 #include "base/macros.h" 25 #include "base/variant_map.h" 26 #include "cmdline_types.h" 27 28 namespace art HIDDEN { 29 30 enum class ProfileMethodsCheck : uint8_t; 31 32 // Defines a type-safe heterogeneous key->value map. This is to be used as the base for 33 // an extended map. 34 template <typename Base, template <typename TV> class KeyType> 35 struct CompilerOptionsMap : VariantMap<Base, KeyType> { 36 // Make the next many usages of Key slightly shorter to type. 37 template <typename TValue> 38 using Key = KeyType<TValue>; 39 40 // List of key declarations, shorthand for 'static const Key<T> Name' 41 #define COMPILER_OPTIONS_KEY(Type, Name, ...) static const Key<Type> (Name); 42 #include "compiler_options_map.def" 43 }; 44 45 #undef COMPILER_OPTIONS_KEY 46 47 } // namespace art 48 49 #endif // ART_COMPILER_DRIVER_COMPILER_OPTIONS_MAP_H_ 50