LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
LTOModule Struct Reference

#include <LTOModule.h>

Public Member Functions

const char * getTargetTriple ()
 getTargetTriple - Return the Module's target triple. More...
 
void setTargetTriple (const char *triple)
 setTargetTriple - Set the Module's target triple. More...
 
uint32_t getSymbolCount ()
 getSymbolCount - Get the number of symbols More...
 
lto_symbol_attributes getSymbolAttributes (uint32_t index)
 
const char * getSymbolName (uint32_t index)
 getSymbolName - Get the name of the symbol at the specified index. More...
 
llvm::ModulegetLLVVMModule ()
 getLLVVMModule - Return the Module. More...
 
const std::vector< const char * > & getAsmUndefinedRefs ()
 getAsmUndefinedRefs - More...
 

Static Public Member Functions

static bool isBitcodeFile (const void *mem, size_t length)
 
static bool isBitcodeFile (const char *path)
 
static bool isBitcodeFileForTarget (const void *mem, size_t length, const char *triplePrefix)
 
static bool isBitcodeFileForTarget (const char *path, const char *triplePrefix)
 
static LTOModulemakeLTOModule (const char *path, llvm::TargetOptions options, std::string &errMsg)
 
static LTOModulemakeLTOModule (int fd, const char *path, size_t size, llvm::TargetOptions options, std::string &errMsg)
 
static LTOModulemakeLTOModule (int fd, const char *path, size_t map_size, off_t offset, llvm::TargetOptions options, std::string &errMsg)
 
static LTOModulemakeLTOModule (const void *mem, size_t length, llvm::TargetOptions options, std::string &errMsg)
 

Detailed Description

LTOModule - C++ class which implements the opaque lto_module_t type.

Definition at line 39 of file LTOModule.h.

Member Function Documentation

const std::vector<const char*>& LTOModule::getAsmUndefinedRefs ( )
inline

getAsmUndefinedRefs -

Definition at line 134 of file LTOModule.h.

Referenced by LTOCodeGenerator::addModule().

llvm::Module* LTOModule::getLLVVMModule ( )
inline

getLLVVMModule - Return the Module.

Definition at line 131 of file LTOModule.h.

References llvm::OwningPtr< T >::get().

Referenced by LTOCodeGenerator::addModule().

lto_symbol_attributes LTOModule::getSymbolAttributes ( uint32_t  index)
inline

getSymbolAttributes - Get the attributes for a symbol at the specified index.

Definition at line 117 of file LTOModule.h.

References attributes.

uint32_t LTOModule::getSymbolCount ( )
inline

getSymbolCount - Get the number of symbols

Definition at line 111 of file LTOModule.h.

const char* LTOModule::getSymbolName ( uint32_t  index)
inline

getSymbolName - Get the name of the symbol at the specified index.

Definition at line 124 of file LTOModule.h.

const char* LTOModule::getTargetTriple ( )
inline

getTargetTriple - Return the Module's target triple.

Definition at line 101 of file LTOModule.h.

References llvm::Module::getTargetTriple().

bool LTOModule::isBitcodeFile ( const void *  mem,
size_t  length 
)
static

isBitcodeFile - Returns 'true' if the file or memory contents is LLVM bitcode.

isBitcodeFile - Returns 'true' if the file (or memory contents) is LLVM bitcode.

Definition at line 51 of file LTOModule.cpp.

References llvm::sys::fs::identify_magic().

bool LTOModule::isBitcodeFile ( const char *  path)
static

Definition at line 56 of file LTOModule.cpp.

References llvm::sys::fs::identify_magic().

bool LTOModule::isBitcodeFileForTarget ( const void *  mem,
size_t  length,
const char *  triplePrefix 
)
static

isBitcodeFileForTarget - Returns 'true' if the file or memory contents is LLVM bitcode for the specified triple.

isBitcodeFileForTarget - Returns 'true' if the file (or memory contents) is LLVM bitcode for the specified triple.

Definition at line 65 of file LTOModule.cpp.

bool LTOModule::isBitcodeFileForTarget ( const char *  path,
const char *  triplePrefix 
)
static

Definition at line 73 of file LTOModule.cpp.

References llvm::OwningPtr< T >::take().

LTOModule * LTOModule::makeLTOModule ( const char *  path,
llvm::TargetOptions  options,
std::string &  errMsg 
)
static

makeLTOModule - Create an LTOModule. N.B. These methods take ownership of the buffer. The caller must have initialized the Targets, the TargetMCs, the AsmPrinters, and the AsmParsers by calling:

InitializeAllTargets(); InitializeAllTargetMCs(); InitializeAllAsmPrinters(); InitializeAllAsmParsers();

makeLTOModule - Create an LTOModule. N.B. These methods take ownership of the buffer.

Definition at line 91 of file LTOModule.cpp.

References llvm::OwningPtr< T >::take().

Referenced by makeLTOModule().

LTOModule * LTOModule::makeLTOModule ( int  fd,
const char *  path,
size_t  size,
llvm::TargetOptions  options,
std::string &  errMsg 
)
static

Definition at line 101 of file LTOModule.cpp.

References makeLTOModule().

LTOModule * LTOModule::makeLTOModule ( int  fd,
const char *  path,
size_t  map_size,
off_t  offset,
llvm::TargetOptions  options,
std::string &  errMsg 
)
static

Definition at line 107 of file LTOModule.cpp.

References makeLTOModule(), and llvm::OwningPtr< T >::take().

LTOModule * LTOModule::makeLTOModule ( const void *  mem,
size_t  length,
llvm::TargetOptions  options,
std::string &  errMsg 
)
static

Definition at line 121 of file LTOModule.cpp.

References makeLTOModule(), and llvm::OwningPtr< T >::take().

void LTOModule::setTargetTriple ( const char *  triple)
inline

setTargetTriple - Set the Module's target triple.

Definition at line 106 of file LTOModule.h.

References llvm::Module::setTargetTriple().


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