LLVM  6.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
llvm::RegisterTarget< TargetArchType, HasJIT > Struct Template Reference

RegisterTarget - Helper template for registering a target, for use in the target's initialization function. More...

#include "llvm/Support/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)
 

Detailed Description

template<Triple::ArchType TargetArchType = Triple::UnknownArch, bool HasJIT = false>
struct llvm::RegisterTarget< TargetArchType, HasJIT >

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"); }

Definition at line 897 of file TargetRegistry.h.

Constructor & Destructor Documentation

◆ RegisterTarget()

template<Triple::ArchType TargetArchType = Triple::UnknownArch, bool HasJIT = false>
llvm::RegisterTarget< TargetArchType, HasJIT >::RegisterTarget ( Target T,
const char Name,
const char Desc,
const char BackendName 
)
inline

Definition at line 898 of file TargetRegistry.h.

References llvm::TargetRegistry::RegisterTarget().

Member Function Documentation

◆ getArchMatch()

template<Triple::ArchType TargetArchType = Triple::UnknownArch, bool HasJIT = false>
static bool llvm::RegisterTarget< TargetArchType, HasJIT >::getArchMatch ( Triple::ArchType  Arch)
inlinestatic

Definition at line 904 of file TargetRegistry.h.


The documentation for this struct was generated from the following file: