LLVM API Documentation
#include <LTOCodeGenerator.h>
Public Member Functions | |
LTOCodeGenerator () | |
~LTOCodeGenerator () | |
bool | addModule (struct LTOModule *, std::string &errMsg) |
void | setTargetOptions (TargetOptions options) |
void | setDebugInfo (lto_debug_model) |
void | setCodePICModel (lto_codegen_model) |
void | setCpu (const char *mCpu) |
void | setAttr (const char *mAttr) |
void | addMustPreserveSymbol (const char *sym) |
void | setCodeGenDebugOptions (const char *opts) |
void | parseCodeGenDebugOptions () |
bool | writeMergedModules (const char *path, std::string &errMsg) |
bool | compile_to_file (const char **name, bool disableOpt, bool disableInline, bool disableGVNLoadPRE, std::string &errMsg) |
const void * | compile (size_t *length, bool disableOpt, bool disableInline, bool disableGVNLoadPRE, std::string &errMsg) |
void | setDiagnosticHandler (lto_diagnostic_handler_t, void *) |
Static Public Member Functions | |
static const char * | getVersionString () |
C++ class which implements the opaque lto_code_gen_t type.
Definition at line 60 of file LTOCodeGenerator.h.
Definition at line 66 of file LTOCodeGenerator.cpp.
Definition at line 74 of file LTOCodeGenerator.cpp.
References llvm::Linker::deleteModule(), llvm::LibFunc::free, and I.
bool LTOCodeGenerator::addModule | ( | struct LTOModule * | mod, |
std::string & | errMsg | ||
) |
Definition at line 116 of file LTOCodeGenerator.cpp.
References llvm::LTOModule::getAsmUndefinedRefs(), llvm::LTOModule::getModule(), and llvm::Linker::linkInModule().
void llvm::LTOCodeGenerator::addMustPreserveSymbol | ( | const char * | sym | ) | [inline] |
Definition at line 76 of file LTOCodeGenerator.h.
const void * LTOCodeGenerator::compile | ( | size_t * | length, |
bool | disableOpt, | ||
bool | disableInline, | ||
bool | disableGVNLoadPRE, | ||
std::string & | errMsg | ||
) |
Definition at line 225 of file LTOCodeGenerator.cpp.
References compile_to_file(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), and llvm::LibFunc::remove.
bool LTOCodeGenerator::compile_to_file | ( | const char ** | name, |
bool | disableOpt, | ||
bool | disableInline, | ||
bool | disableGVNLoadPRE, | ||
std::string & | errMsg | ||
) |
Definition at line 187 of file LTOCodeGenerator.cpp.
References llvm::SmallString< InternalLen >::c_str(), llvm::sys::fs::createTemporaryFile(), and llvm::LibFunc::remove.
Referenced by compile().
const char * LTOCodeGenerator::getVersionString | ( | ) | [static] |
Definition at line 58 of file LTOCodeGenerator.cpp.
References PACKAGE_NAME, and PACKAGE_VERSION.
Definition at line 510 of file LTOCodeGenerator.cpp.
References llvm::cl::ParseCommandLineOptions().
void llvm::LTOCodeGenerator::setAttr | ( | const char * | mAttr | ) | [inline] |
Definition at line 74 of file LTOCodeGenerator.h.
void LTOCodeGenerator::setCodeGenDebugOptions | ( | const char * | options | ) |
setCodeGenDebugOptions - Set codegen debugging options to aid in debugging LTO problems.
Definition at line 499 of file LTOCodeGenerator.cpp.
References llvm::getToken(), and llvm::LibFunc::strdup.
void LTOCodeGenerator::setCodePICModel | ( | lto_codegen_model | model | ) |
Definition at line 143 of file LTOCodeGenerator.cpp.
References llvm_unreachable, LTO_CODEGEN_PIC_MODEL_DEFAULT, LTO_CODEGEN_PIC_MODEL_DYNAMIC, LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC, and LTO_CODEGEN_PIC_MODEL_STATIC.
void llvm::LTOCodeGenerator::setCpu | ( | const char * | mCpu | ) | [inline] |
Definition at line 73 of file LTOCodeGenerator.h.
void LTOCodeGenerator::setDebugInfo | ( | lto_debug_model | debug | ) |
Definition at line 130 of file LTOCodeGenerator.cpp.
References llvm_unreachable, LTO_DEBUG_MODEL_DWARF, and LTO_DEBUG_MODEL_NONE.
void LTOCodeGenerator::setDiagnosticHandler | ( | lto_diagnostic_handler_t | DiagHandler, |
void * | Ctxt | ||
) |
Definition at line 553 of file LTOCodeGenerator.cpp.
void LTOCodeGenerator::setTargetOptions | ( | TargetOptions | options | ) |
Definition at line 126 of file LTOCodeGenerator.cpp.
bool LTOCodeGenerator::writeMergedModules | ( | const char * | path, |
std::string & | errMsg | ||
) |
Definition at line 155 of file LTOCodeGenerator.cpp.
References llvm::raw_fd_ostream::clear_error(), llvm::raw_fd_ostream::close(), llvm::sys::fs::F_None, llvm::Linker::getModule(), llvm::raw_fd_ostream::has_error(), llvm::tool_output_file::keep(), llvm::tool_output_file::os(), and llvm::WriteBitcodeToFile().