RegisterTarget - Helper template for registering a target, for use in the target's initialization function. Usage:
Declared in <llvm/MC/TargetRegistry.h>
template<
Triple::ArchType TargetArchType = Triple::UnknownArch,
bool HasJIT = false>
struct RegisterTarget;
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 */); }
| Name | Description |
|---|---|
RegisterTarget [constructor] | Register target T with the given identity and backend name. |
| Name | Description |
|---|---|
getArchMatch | Return true if Arch matches this registration's architecture. |