LLVM 20.0.0git
|
RegisterTarget - Helper template for registering a target, for use in the target's initialization function. More...
#include "llvm/MC/TargetRegistry.h"
Public Member Functions | |
RegisterTarget (Target &T, const char *Name, const char *Desc, const char *BackendName) | |
Static Public Member Functions | |
static bool | getArchMatch (Triple::ArchType Arch) |
RegisterTarget - Helper template for registering a target, for use in the target's initialization function.
Usage:
Target &getTheFooTarget() { // The global target instance. static Target TheFooTarget; return TheFooTarget; } extern "C" void LLVMInitializeFooTargetInfo() { RegisterTarget<Triple::foo> X(getTheFooTarget(), "foo", "Foo description", "Foo" /* Backend Name */); }
Definition at line 1030 of file TargetRegistry.h.
|
inline |
Definition at line 1031 of file TargetRegistry.h.
References llvm::RegisterTarget< TargetArchType, HasJIT >::getArchMatch(), Name, and llvm::TargetRegistry::RegisterTarget().
|
inlinestatic |
Definition at line 1037 of file TargetRegistry.h.
Referenced by llvm::RegisterTarget< TargetArchType, HasJIT >::RegisterTarget().