summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/lto.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-03-17 00:36:11 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-03-17 00:36:11 +0000
commitb39c7c7b17434235faf07ecbcd41215b82f9422f (patch)
treed78c141459946a76bb06449a6d24d9ed53bc48fa /llvm/include/llvm-c/lto.h
parent07de07eeea3a9a2050c7c28cdc8146df26f3a377 (diff)
downloadbcm5719-llvm-b39c7c7b17434235faf07ecbcd41215b82f9422f.tar.gz
bcm5719-llvm-b39c7c7b17434235faf07ecbcd41215b82f9422f.zip
Add support in the LTO library for loading an object from the middle
of an file. llvm-svn: 127781
Diffstat (limited to 'llvm/include/llvm-c/lto.h')
-rw-r--r--llvm/include/llvm-c/lto.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h
index 1c42ce0cec7..be08c4eb196 100644
--- a/llvm/include/llvm-c/lto.h
+++ b/llvm/include/llvm-c/lto.h
@@ -127,7 +127,15 @@ lto_module_create_from_memory(const void* mem, size_t length);
* Returns NULL on error (check lto_get_error_message() for details).
*/
extern lto_module_t
-lto_module_create_from_fd(int fd, const char *path, off_t size);
+lto_module_create_from_fd(int fd, const char *path, size_t file_size);
+
+/**
+ * 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).
+ */
+extern lto_module_t
+lto_module_create_from_fd_at_offset(int fd, const char *path, size_t file_size,
+ size_t map_size, off_t offset);
/**
OpenPOWER on IntegriCloud