//===- TargetSelect.h - Target Selection & Registration ---------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file provides utilities to make sure that certain classes of targets are // linked into the main application executable, and initialize them as // appropriate. // //===----------------------------------------------------------------------===// #ifndef LLVM_SUPPORT_TARGETSELECT_H #define LLVM_SUPPORT_TARGETSELECT_H #include "llvm/Config/llvm-config.h" extern "C" { // Declare all of the target-initialization functions that are available. #define LLVM_TARGET … #include "llvm/Config/Targets.def" #define LLVM_TARGET … #include "llvm/Config/Targets.def" // Declare all of the target-MC-initialization functions that are available. #define LLVM_TARGET … #include "llvm/Config/Targets.def" // Declare all of the available assembly printer initialization functions. #define LLVM_ASM_PRINTER … #include "llvm/Config/AsmPrinters.def" // Declare all of the available assembly parser initialization functions. #define LLVM_ASM_PARSER … #include "llvm/Config/AsmParsers.def" // Declare all of the available disassembler initialization functions. #define LLVM_DISASSEMBLER … #include "llvm/Config/Disassemblers.def" // Declare all of the available TargetMCA initialization functions. #define LLVM_TARGETMCA … #include "llvm/Config/TargetMCAs.def" } namespace llvm { /// InitializeAllTargetInfos - The main program should call this function if /// it wants access to all available targets that LLVM is configured to /// support, to make them available via the TargetRegistry. /// /// It is legal for a client to make multiple calls to this function. inline void InitializeAllTargetInfos() { … } /// InitializeAllTargets - The main program should call this function if it /// wants access to all available target machines that LLVM is configured to /// support, to make them available via the TargetRegistry. /// /// It is legal for a client to make multiple calls to this function. inline void InitializeAllTargets() { … } /// InitializeAllTargetMCs - The main program should call this function if it /// wants access to all available target MC that LLVM is configured to /// support, to make them available via the TargetRegistry. /// /// It is legal for a client to make multiple calls to this function. inline void InitializeAllTargetMCs() { … } /// InitializeAllAsmPrinters - The main program should call this function if /// it wants all asm printers that LLVM is configured to support, to make them /// available via the TargetRegistry. /// /// It is legal for a client to make multiple calls to this function. inline void InitializeAllAsmPrinters() { … } /// InitializeAllAsmParsers - The main program should call this function if it /// wants all asm parsers that LLVM is configured to support, to make them /// available via the TargetRegistry. /// /// It is legal for a client to make multiple calls to this function. inline void InitializeAllAsmParsers() { … } /// InitializeAllDisassemblers - The main program should call this function if /// it wants all disassemblers that LLVM is configured to support, to make /// them available via the TargetRegistry. /// /// It is legal for a client to make multiple calls to this function. inline void InitializeAllDisassemblers() { … } /// InitializeNativeTarget - The main program should call this function to /// initialize the native target corresponding to the host. This is useful /// for JIT applications to ensure that the target gets linked in correctly. /// /// It is legal for a client to make multiple calls to this function. inline bool InitializeNativeTarget() { … } /// InitializeNativeTargetAsmPrinter - The main program should call /// this function to initialize the native target asm printer. inline bool InitializeNativeTargetAsmPrinter() { … } /// InitializeNativeTargetAsmParser - The main program should call /// this function to initialize the native target asm parser. inline bool InitializeNativeTargetAsmParser() { … } /// InitializeNativeTargetDisassembler - The main program should call /// this function to initialize the native target disassembler. inline bool InitializeNativeTargetDisassembler() { … } /// InitializeAllTargetMCAs - The main program should call /// this function to initialize the target CustomBehaviour and /// InstrPostProcess classes. inline void InitializeAllTargetMCAs() { … } } #endif