mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-27 15:57:13 +00:00
lto: Clean up C libLTO interfaces pertaining to linker flags.
Specifically, remove the dependent library interface and replace the existing linker option interface with a new one that returns a single list of flags. Differential Revision: http://reviews.llvm.org/D10820 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241018 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
717764717b
commit
10e9fb18d4
@ -40,7 +40,7 @@ typedef bool lto_bool_t;
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LTO_API_VERSION 15
|
#define LTO_API_VERSION 16
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \since prior to LTO_API_VERSION=3
|
* \since prior to LTO_API_VERSION=3
|
||||||
@ -280,49 +280,15 @@ lto_module_get_symbol_attribute(lto_module_t mod, unsigned int index);
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of dependent libraries in the object module.
|
* Returns the module's linker options.
|
||||||
*
|
*
|
||||||
* Deprecated. Now returns an empty list.
|
* The linker options may consist of multiple flags. It is the linker's
|
||||||
*
|
|
||||||
* \since LTO_API_VERSION=8
|
|
||||||
*/
|
|
||||||
extern unsigned int
|
|
||||||
lto_module_get_num_deplibs(lto_module_t mod);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the ith dependent library in the module.
|
|
||||||
*
|
|
||||||
* Deprecated. Now always returns null.
|
|
||||||
*
|
|
||||||
* \since LTO_API_VERSION=8
|
|
||||||
*/
|
|
||||||
extern const char*
|
|
||||||
lto_module_get_deplib(lto_module_t mod, unsigned int index);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of linker options in the object module.
|
|
||||||
*
|
|
||||||
* Each linker option may consist of multiple flags. It is the linker's
|
|
||||||
* responsibility to split the flags using a platform-specific mechanism.
|
* responsibility to split the flags using a platform-specific mechanism.
|
||||||
*
|
*
|
||||||
* \since LTO_API_VERSION=8
|
* \since LTO_API_VERSION=16
|
||||||
*/
|
|
||||||
extern unsigned int
|
|
||||||
lto_module_get_num_linkeropts(lto_module_t mod);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the ith linker option in the module.
|
|
||||||
*
|
|
||||||
* Each linker option may consist of multiple flags. It is the linker's
|
|
||||||
* responsibility to split the flags using a platform-specific mechanism.
|
|
||||||
*
|
|
||||||
* \since LTO_API_VERSION=8
|
|
||||||
*/
|
*/
|
||||||
extern const char*
|
extern const char*
|
||||||
lto_module_get_linkeropt(lto_module_t mod, unsigned int index);
|
lto_module_get_linkeropts(lto_module_t mod);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -223,21 +223,7 @@ lto_symbol_attributes lto_module_get_symbol_attribute(lto_module_t mod,
|
|||||||
return unwrap(mod)->getSymbolAttributes(index);
|
return unwrap(mod)->getSymbolAttributes(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int lto_module_get_num_deplibs(lto_module_t mod) {
|
const char* lto_module_get_linkeropts(lto_module_t mod) {
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* lto_module_get_deplib(lto_module_t mod, unsigned int index) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int lto_module_get_num_linkeropts(lto_module_t mod) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* lto_module_get_linkeropt(lto_module_t mod, unsigned int index) {
|
|
||||||
if (index != 0)
|
|
||||||
return nullptr;
|
|
||||||
return unwrap(mod)->getLinkerOpts();
|
return unwrap(mod)->getLinkerOpts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,10 +8,7 @@ lto_module_create_from_memory
|
|||||||
lto_module_create_from_memory_with_path
|
lto_module_create_from_memory_with_path
|
||||||
lto_module_create_in_local_context
|
lto_module_create_in_local_context
|
||||||
lto_module_create_in_codegen_context
|
lto_module_create_in_codegen_context
|
||||||
lto_module_get_deplib
|
lto_module_get_linkeropts
|
||||||
lto_module_get_linkeropt
|
|
||||||
lto_module_get_num_deplibs
|
|
||||||
lto_module_get_num_linkeropts
|
|
||||||
lto_module_get_num_symbols
|
lto_module_get_num_symbols
|
||||||
lto_module_get_symbol_attribute
|
lto_module_get_symbol_attribute
|
||||||
lto_module_get_symbol_name
|
lto_module_get_symbol_name
|
||||||
|
Loading…
Reference in New Issue
Block a user