summaryrefslogtreecommitdiff
path: root/include
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
commitf21b1058a194f411000bdd8000a8b675a7874056 (patch)
tree1d9ae970a490bdd64c51e774a31db3487dd211ff /include
parentd02c8b6cc1d07bfe37fc055eefdac21b1c9303cb (diff)
downloadllvm-f21b1058a194f411000bdd8000a8b675a7874056.tar.gz
llvm-f21b1058a194f411000bdd8000a8b675a7874056.tar.bz2
llvm-f21b1058a194f411000bdd8000a8b675a7874056.tar.xz
Add support in the LTO library for loading an object from the middle
of an file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127781 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm-c/lto.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm-c/lto.h b/include/llvm-c/lto.h
index 1c42ce0cec..be08c4eb19 100644
--- a/include/llvm-c/lto.h
+++ b/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);
/**