|
LLVM
3.7.0
|
C++ class which implements the opaque lto_module_t type. More...
#include <LTOModule.h>
Public Member Functions | |
| ~LTOModule () | |
| const Module & | getModule () const |
| Module & | getModule () |
| const std::string & | getTargetTriple () |
| Return the Module's target triple. More... | |
| void | setTargetTriple (StringRef Triple) |
| Set the Module's target triple. More... | |
| uint32_t | getSymbolCount () |
| Get the number of symbols. More... | |
| lto_symbol_attributes | getSymbolAttributes (uint32_t index) |
| Get the attributes for a symbol at the specified index. More... | |
| const char * | getSymbolName (uint32_t index) |
| Get the name of the symbol at the specified index. More... | |
| const GlobalValue * | getSymbolGV (uint32_t index) |
| const char * | getLinkerOpts () |
| const std::vector< const char * > & | getAsmUndefinedRefs () |
Static Public Member Functions | |
| static bool | isBitcodeFile (const void *mem, size_t length) |
| Returns 'true' if the file or memory contents is LLVM bitcode. More... | |
| static bool | isBitcodeFile (const char *path) |
| static bool | isBitcodeForTarget (MemoryBuffer *memBuffer, StringRef triplePrefix) |
| Returns 'true' if the memory buffer is LLVM bitcode for the specified triple. More... | |
| static std::unique_ptr < MemoryBuffer > | makeBuffer (const void *mem, size_t length, StringRef name="") |
| Create a MemoryBuffer from a memory range with an optional name. More... | |
| static LTOModule * | createFromFile (const char *path, TargetOptions options, std::string &errMsg) |
| Create an LTOModule. More... | |
| static LTOModule * | createFromOpenFile (int fd, const char *path, size_t size, TargetOptions options, std::string &errMsg) |
| static LTOModule * | createFromOpenFileSlice (int fd, const char *path, size_t map_size, off_t offset, TargetOptions options, std::string &errMsg) |
| static LTOModule * | createFromBuffer (const void *mem, size_t length, TargetOptions options, std::string &errMsg, StringRef path="") |
| static LTOModule * | createInLocalContext (const void *mem, size_t length, TargetOptions options, std::string &errMsg, StringRef path) |
| static LTOModule * | createInContext (const void *mem, size_t length, TargetOptions options, std::string &errMsg, StringRef path, LLVMContext *Context) |
C++ class which implements the opaque lto_module_t type.
Definition at line 39 of file LTOModule.h.
| LTOModule::~LTOModule | ( | ) |
Definition at line 62 of file LTOModule.cpp.
|
static |
Definition at line 128 of file LTOModule.cpp.
References createInContext(), and llvm::getGlobalContext().
|
static |
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();
Definition at line 94 of file LTOModule.cpp.
References llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), and llvm::getGlobalContext().
|
static |
Definition at line 107 of file LTOModule.cpp.
References createFromOpenFileSlice().
|
static |
Definition at line 113 of file LTOModule.cpp.
References llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::getGlobalContext(), and llvm::MemoryBuffer::getOpenFileSlice().
Referenced by createFromOpenFile().
|
static |
Definition at line 142 of file LTOModule.cpp.
References llvm::Data.
Referenced by createFromBuffer(), and createInLocalContext().
|
static |
Definition at line 135 of file LTOModule.cpp.
References createInContext().
Definition at line 155 of file LTOModule.h.
Referenced by llvm::LTOCodeGenerator::addModule(), and llvm::LTOCodeGenerator::setModule().
|
inline |
Definition at line 151 of file LTOModule.h.
Definition at line 109 of file LTOModule.h.
Referenced by llvm::LTOCodeGenerator::addModule(), getTargetTriple(), llvm::LTOCodeGenerator::setModule(), and setTargetTriple().
|
inline |
Definition at line 112 of file LTOModule.h.
|
inline |
Get the attributes for a symbol at the specified index.
Definition at line 132 of file LTOModule.h.
References attributes.
|
inline |
Get the number of symbols.
Definition at line 127 of file LTOModule.h.
|
inline |
Definition at line 145 of file LTOModule.h.
|
inline |
Get the name of the symbol at the specified index.
Definition at line 139 of file LTOModule.h.
References name.
|
inline |
Return the Module's target triple.
Definition at line 117 of file LTOModule.h.
References getModule(), and llvm::Module::getTargetTriple().
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 66 of file LTOModule.cpp.
References llvm::object::IRObjectFile::findBitcodeInMemBuffer().
Definition at line 72 of file LTOModule.cpp.
References llvm::object::IRObjectFile::findBitcodeInMemBuffer(), llvm::ErrorOr< T >::get(), and llvm::MemoryBuffer::getFile().
|
static |
Returns 'true' if the memory buffer is LLVM bitcode for the specified triple.
Definition at line 83 of file LTOModule.cpp.
References llvm::object::IRObjectFile::findBitcodeInMemBuffer(), llvm::getBitcodeTargetTriple(), llvm::MemoryBuffer::getMemBufferRef(), and llvm::StringRef::startswith().
|
static |
Create a MemoryBuffer from a memory range with an optional name.
Definition at line 258 of file LTOModule.cpp.
References llvm::MemoryBuffer::getMemBuffer().
|
inline |
Set the Module's target triple.
Definition at line 122 of file LTOModule.h.
References getModule(), and llvm::Module::setTargetTriple().
1.8.6