1 //===-- TargetSelect.h ------------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 /// 9 /// \file 10 /// 11 /// Utilities to handle the creation of the enabled exegesis target(s). 12 /// 13 //===----------------------------------------------------------------------===// 14 15 #ifndef LLVM_TOOLS_LLVM_EXEGESIS_TARGET_SELECT_H 16 #define LLVM_TOOLS_LLVM_EXEGESIS_TARGET_SELECT_H 17 18 #include "llvm/Config/llvm-config.h" 19 20 namespace llvm { 21 namespace exegesis { 22 23 // Forward declare all of the initialize methods for targets compiled in 24 #define LLVM_EXEGESIS(TargetName) void Initialize##TargetName##ExegesisTarget(); 25 #include "llvm/Config/TargetExegesis.def" 26 27 // Initializes all exegesis targets compiled in. InitializeAllExegesisTargets()28inline void InitializeAllExegesisTargets() { 29 #define LLVM_EXEGESIS(TargetName) Initialize##TargetName##ExegesisTarget(); 30 #include "llvm/Config/TargetExegesis.def" 31 } 32 33 } // namespace exegesis 34 } // namespace llvm 35 36 #endif // LLVM_TOOLS_LLVM_EXEGESIS_TARGET_SELECT_H 37