diff options
Diffstat (limited to 'llvm/tools/lto/lto.cpp')
-rw-r--r-- | llvm/tools/lto/lto.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/tools/lto/lto.cpp b/llvm/tools/lto/lto.cpp index 3d58a577dc4..967250acd71 100644 --- a/llvm/tools/lto/lto.cpp +++ b/llvm/tools/lto/lto.cpp @@ -193,6 +193,28 @@ lto_symbol_attributes lto_module_get_symbol_attribute(lto_module_t mod, return mod->getSymbolAttributes(index); } +/// lto_module_get_num_deplibs - Returns the number of dependent libraries in +/// the object module. +unsigned int lto_module_get_num_deplibs(lto_module_t mod) { + return mod->getDependentLibraryCount(); +} + +/// lto_module_get_deplib - Returns the ith dependent library in the module. +const char* lto_module_get_deplib(lto_module_t mod, unsigned int index) { + return mod->getDependentLibrary(index); +} + +/// lto_module_get_num_linkeropts - Returns the number of linker options in the +/// object module. +unsigned int lto_module_get_num_linkeropts(lto_module_t mod) { + return mod->getLinkerOptCount(); +} + +/// lto_module_get_linkeropt - Returns the ith linker option in the module. +const char* lto_module_get_linkeropt(lto_module_t mod, unsigned int index) { + return mod->getLinkerOpt(index); +} + /// Set a diagnostic handler. void lto_codegen_set_diagnostic_handler(lto_code_gen_t cg, lto_diagnostic_handler_t diag_handler, |