Hi,
This patch adds the following LTO interface to parse metadata nodes and extract linker options and dependent
libraries from a bitcode module. The new API functions are:
unsigned int lto_module_get_num_deplibs(lto_module_t mod) : Returns the number of dependent libraries in the object module.
const char* lto_module_get_deplib(lto_module_t mod, unsigned int index) : Returns the ith dependent library in the module.
unsigned int lto_module_get_num_linkeropts(lto_module_t mod) : Returns the number of linker options in the object module.
const char* lto_module_get_linkeropt(lto_module_t mod, unsigned int index) : Returns the ith linker option in the module.
These new APIs are very similar to the existing APIs for symbols.
Could someone take a look whether this is good to go in? Does anyone have strong opinion on this proposed interface?
Many thanks,
- Gao.