LLVM API Documentation

llvm::Target Class Reference

#include <TargetRegistry.h>

Collaboration diagram for llvm::Target:
[legend]

List of all members.

Public Types

typedef unsigned(* TripleMatchQualityFnTy )(const std::string &TT)
typedef const TargetAsmInfo *(* AsmInfoCtorFnTy )(const Target &T, const StringRef &TT)
typedef TargetMachine *(* TargetMachineCtorTy )(const Target &T, const std::string &TT, const std::string &Features)
typedef AsmPrinter *(* AsmPrinterCtorTy )(formatted_raw_ostream &OS, TargetMachine &TM, const TargetAsmInfo *TAI, bool VerboseAsm)
typedef TargetAsmParser *(* AsmParserCtorTy )(const Target &T, MCAsmParser &P)

Public Member Functions

const Target * getNext () const
const char * getName () const
 getName - Get the target name.
const char * getShortDescription () const
 getShortDescription - Get a short description of the target.
bool hasJIT () const
bool hasTargetMachine () const
 hasTargetMachine - Check if this target supports code generation.
bool hasAsmPrinter () const
 hasAsmPrinter - Check if this target supports .s printing.
bool hasAsmParser () const
 hasAsmParser - Check if this target supports .s parsing.
const TargetAsmInfo * createAsmInfo (const StringRef &Triple) const
TargetMachine * createTargetMachine (const std::string &Triple, const std::string &Features) const
AsmPrinter * createAsmPrinter (formatted_raw_ostream &OS, TargetMachine &TM, const TargetAsmInfo *TAI, bool Verbose) const
 createAsmPrinter - Create a target specific assembly printer pass.
TargetAsmParser * createAsmParser (MCAsmParser &Parser) const

Friends

struct TargetRegistry


Detailed Description

Target - Wrapper for Target specific information.

For registration purposes, this is a POD type so that targets can be registered without the use of static constructors.

Targets should implement a single global instance of this class (which will be zero initialized), and pass that instance to the TargetRegistry as part of their initialization.

Definition at line 43 of file TargetRegistry.h.


Member Typedef Documentation

typedef unsigned(* llvm::Target::TripleMatchQualityFnTy)(const std::string &TT)

typedef const TargetAsmInfo*(* llvm::Target::AsmInfoCtorFnTy)(const Target &T, const StringRef &TT)

typedef TargetMachine*(* llvm::Target::TargetMachineCtorTy)(const Target &T, const std::string &TT, const std::string &Features)


Member Function Documentation

const Target* llvm::Target::getNext (  )  const [inline]

Definition at line 94 of file TargetRegistry.h.

References Next.

Referenced by llvm::TargetRegistry::iterator::operator++().

const char* llvm::Target::getName (  )  const [inline]

getName - Get the target name.

Definition at line 97 of file TargetRegistry.h.

References Name.

const char* llvm::Target::getShortDescription (  )  const [inline]

getShortDescription - Get a short description of the target.

Definition at line 100 of file TargetRegistry.h.

bool llvm::Target::hasJIT (  )  const [inline]

bool llvm::Target::hasTargetMachine (  )  const [inline]

hasTargetMachine - Check if this target supports code generation.

Definition at line 105 of file TargetRegistry.h.

bool llvm::Target::hasAsmPrinter (  )  const [inline]

hasAsmPrinter - Check if this target supports .s printing.

Definition at line 108 of file TargetRegistry.h.

bool llvm::Target::hasAsmParser (  )  const [inline]

hasAsmParser - Check if this target supports .s parsing.

Definition at line 111 of file TargetRegistry.h.

const TargetAsmInfo* llvm::Target::createAsmInfo ( const StringRef &  Triple  )  const [inline]

createAsmInfo - Create a TargetAsmInfo implementation for the specified target triple.

  • Triple - This argument is used to determine the target machine feature set; it should always be provided. Generally this should be either the target triple from the module, or the target triple of the host if that does not exist.

Definition at line 121 of file TargetRegistry.h.

Referenced by llvm::LLVMTargetMachine::LLVMTargetMachine().

TargetMachine* llvm::Target::createTargetMachine ( const std::string &  Triple,
const std::string &  Features 
) const [inline]

createTargetMachine - Create a target specific machine implementation for the specified

  • Triple - This argument is used to determine the target machine feature set; it should always be provided. Generally this should be either the target triple from the module, or the target triple of the host if that does not exist.

Definition at line 134 of file TargetRegistry.h.

Referenced by llvm::JIT::selectTarget().

AsmPrinter* llvm::Target::createAsmPrinter ( formatted_raw_ostream &  OS,
TargetMachine &  TM,
const TargetAsmInfo *  TAI,
bool  Verbose 
) const [inline]

createAsmPrinter - Create a target specific assembly printer pass.

Definition at line 142 of file TargetRegistry.h.

Referenced by llvm::LLVMTargetMachine::addAssemblyEmitter().

TargetAsmParser* llvm::Target::createAsmParser ( MCAsmParser &  Parser  )  const [inline]

createAsmParser - Create a target specific assembly parser.

  • Parser - The target independent parser implementation to use for parsing and lexing.

Definition at line 153 of file TargetRegistry.h.


Friends And Related Function Documentation

friend struct TargetRegistry [friend]

Definition at line 45 of file TargetRegistry.h.


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