blob: 7e2f8466e0031df1fe27de9d11ee55c053ff2cce [file] [log] [blame]
Andreas Gampe097f34c2017-08-23 08:57:51 -07001/*
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
Eric Holkc7ac91b2021-02-04 21:44:01 +000023#include "base/compiler_filter.h"
Andreas Gampe097f34c2017-08-23 08:57:51 -070024#include "base/variant_map.h"
25#include "cmdline_types.h"
26
27namespace art {
28
Andreas Gampe5c803112018-04-13 17:28:34 -070029enum class ProfileMethodsCheck : uint8_t;
30
Andreas Gampe097f34c2017-08-23 08:57:51 -070031// Defines a type-safe heterogeneous key->value map. This is to be used as the base for
32// an extended map.
33template <typename Base, template <typename TV> class KeyType>
34struct CompilerOptionsMap : VariantMap<Base, KeyType> {
35 // Make the next many usages of Key slightly shorter to type.
36 template <typename TValue>
37 using Key = KeyType<TValue>;
38
39 // List of key declarations, shorthand for 'static const Key<T> Name'
40#define COMPILER_OPTIONS_KEY(Type, Name, ...) static const Key<Type> (Name);
41#include "compiler_options_map.def"
42};
43
44#undef DECLARE_KEY
45
46} // namespace art
47
48#endif // ART_COMPILER_DRIVER_COMPILER_OPTIONS_MAP_H_