LLVM API Documentation
#include <TargetRegistry.h>
Static Public Member Functions | |
Registry Access | |
| static iterator | begin () |
| static iterator | end () |
| static const Target * | lookupTarget (const std::string &Triple, std::string &Error) |
| static const Target * | getClosestTargetForJIT (std::string &Error) |
Target Registration | |
| static void | RegisterTarget (Target &T, const char *Name, const char *ShortDesc, Target::TripleMatchQualityFnTy TQualityFn, bool HasJIT=false) |
| static void | RegisterAsmInfo (Target &T, Target::AsmInfoCtorFnTy Fn) |
| static void | RegisterTargetMachine (Target &T, Target::TargetMachineCtorTy Fn) |
| static void | RegisterAsmPrinter (Target &T, Target::AsmPrinterCtorTy Fn) |
| static void | RegisterAsmParser (Target &T, Target::AsmParserCtorTy Fn) |
Classes | |
| class | iterator |
Definition at line 161 of file TargetRegistry.h.
| TargetRegistry::iterator TargetRegistry::begin | ( | ) | [static] |
Definition at line 18 of file TargetRegistry.cpp.
Referenced by lookupTarget(), and llvm::JIT::selectTarget().
| static iterator llvm::TargetRegistry::end | ( | ) | [inline, static] |
Definition at line 204 of file TargetRegistry.h.
Referenced by lookupTarget(), and llvm::JIT::selectTarget().
| const Target * TargetRegistry::lookupTarget | ( | const std::string & | Triple, | |
| std::string & | Error | |||
| ) | [static] |
lookupTarget - Lookup a target based on a target triple.
| Triple | - The triple to use for finding a target. | |
| Error | - On failure, an error string describing why no target was found. |
Definition at line 22 of file TargetRegistry.cpp.
References begin(), end(), and llvm::Target::Name.
Referenced by getClosestTargetForJIT(), and llvm::JIT::selectTarget().
| const Target * TargetRegistry::getClosestTargetForJIT | ( | std::string & | Error | ) | [static] |
getClosestTargetForJIT - Pick the best target that is compatible with the current host. If no close target can be found, this returns null and sets the Error string to a reason.
Maintained for compatibility through 2.6.
Definition at line 81 of file TargetRegistry.cpp.
References llvm::sys::getHostTriple(), llvm::Target::hasJIT(), and lookupTarget().
| void TargetRegistry::RegisterTarget | ( | Target & | T, | |
| const char * | Name, | |||
| const char * | ShortDesc, | |||
| Target::TripleMatchQualityFnTy | TQualityFn, | |||
| bool | HasJIT = false | |||
| ) | [static] |
RegisterTarget - Register the given target. Attempts to register a target which has already been registered will be ignored.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. | |
| Name | - The target name. This should be a static string. | |
| ShortDesc | - A short target description. This should be a static string. | |
| TQualityFn | - The triple match quality computation function for this target. | |
| HasJIT | - Whether the target supports JIT code generation. |
Definition at line 58 of file TargetRegistry.cpp.
References llvm::Target::HasJIT, llvm::Target::Name, llvm::Target::Next, llvm::Target::ShortDesc, and llvm::Target::TripleMatchQualityFn.
Referenced by llvm::RegisterTarget< TargetArchType, HasJIT >::RegisterTarget().
| static void llvm::TargetRegistry::RegisterAsmInfo | ( | Target & | T, | |
| Target::AsmInfoCtorFnTy | Fn | |||
| ) | [inline, static] |
RegisterAsmInfo - Register a TargetAsmInfo implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. | |
| Fn | - A function to construct a TargetAsmInfo for the target. |
Definition at line 255 of file TargetRegistry.h.
References llvm::Target::AsmInfoCtorFn.
Referenced by llvm::RegisterAsmInfo< TargetAsmInfoImpl >::RegisterAsmInfo(), and llvm::RegisterAsmInfoFn::RegisterAsmInfoFn().
| static void llvm::TargetRegistry::RegisterTargetMachine | ( | Target & | T, | |
| Target::TargetMachineCtorTy | Fn | |||
| ) | [inline, static] |
RegisterTargetMachine - Register a TargetMachine implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. | |
| Fn | - A function to construct a TargetMachine for the target. |
Definition at line 270 of file TargetRegistry.h.
References llvm::Target::TargetMachineCtorFn.
Referenced by llvm::RegisterTargetMachine< TargetMachineImpl >::RegisterTargetMachine().
| static void llvm::TargetRegistry::RegisterAsmPrinter | ( | Target & | T, | |
| Target::AsmPrinterCtorTy | Fn | |||
| ) | [inline, static] |
RegisterAsmPrinter - Register an AsmPrinter implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. | |
| Fn | - A function to construct an AsmPrinter for the target. |
Definition at line 286 of file TargetRegistry.h.
References llvm::Target::AsmPrinterCtorFn.
Referenced by llvm::RegisterAsmPrinter< AsmPrinterImpl >::RegisterAsmPrinter().
| static void llvm::TargetRegistry::RegisterAsmParser | ( | Target & | T, | |
| Target::AsmParserCtorTy | Fn | |||
| ) | [inline, static] |
RegisterAsmParser - Register a TargetAsmParser implementation for the given target.
Clients are responsible for ensuring that registration doesn't occur while another thread is attempting to access the registry. Typically this is done by initializing all targets at program startup.
| T | - The target being registered. | |
| Fn | - A function to construct an AsmPrinter for the target. |
Definition at line 301 of file TargetRegistry.h.
References llvm::Target::AsmParserCtorFn.
Referenced by llvm::RegisterAsmParser< AsmParserImpl >::RegisterAsmParser().