mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
LTO API: add lto_module_create_from_memory_with_path.
This function adds an extra path argument to lto_module_create_from_memory. The path argument will be passed to makeBuffer to make sure the MemoryBuffer has a name and the created module has a module identifier. This is mainly for emitting warning messages from the linker. When we emit warning message on a module, we can use the module identifier. rdar://15985737 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201114 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,7 +40,7 @@ typedef bool lto_bool_t;
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define LTO_API_VERSION 8
|
||||
#define LTO_API_VERSION 9
|
||||
|
||||
/**
|
||||
* \since prior to LTO_API_VERSION=3
|
||||
@@ -175,6 +175,16 @@ lto_module_create(const char* path);
|
||||
extern lto_module_t
|
||||
lto_module_create_from_memory(const void* mem, size_t length);
|
||||
|
||||
/**
|
||||
* Loads an object file from memory with an extra path argument.
|
||||
* Returns NULL on error (check lto_get_error_message() for details).
|
||||
*
|
||||
* \since prior to LTO_API_VERSION=9
|
||||
*/
|
||||
extern lto_module_t
|
||||
lto_module_create_from_memory_with_path(const void* mem, size_t length,
|
||||
const char *path);
|
||||
|
||||
/**
|
||||
* Loads an object file from disk. The seek point of fd is not preserved.
|
||||
* Returns NULL on error (check lto_get_error_message() for details).
|
||||
|
Reference in New Issue
Block a user