aboutsummaryrefslogtreecommitdiff
path: root/include/llvm-c
diff options
context:
space:
mode:
authorJan Voung <jvoung@google.com>2012-08-13 14:21:33 -0700
committerDerek Schuff <dschuff@chromium.org>2012-08-13 14:21:33 -0700
commit7374149c4b9870aafdab2d41773f5d46527a6b8e (patch)
treefa911e268e32bc32d650e10618f5dbcbfd220d99 /include/llvm-c
parent2f3b7d98a9c92d6a75c84fe44f98e97917a18c3f (diff)
Change LLVM bitcode linking to use tree reduction
rather than link in one at a time. Linking one at a time means that the "Dst" module keeps growing yet needs to be crawled entirely at each step to gather a set of types. http://codereview.chromium.org/10808021/
Diffstat (limited to 'include/llvm-c')
-rw-r--r--include/llvm-c/lto.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/llvm-c/lto.h b/include/llvm-c/lto.h
index c6f4417e19..864870bfe7 100644
--- a/include/llvm-c/lto.h
+++ b/include/llvm-c/lto.h
@@ -259,7 +259,26 @@ lto_codegen_dispose(lto_code_gen_t);
extern bool
lto_codegen_add_module(lto_code_gen_t cg, lto_module_t mod);
+/* @LOCALMOD-BEGIN */
+/**
+ * Add an object module to the set of modules for which code will be generated.
+ * This does not merge the module immediately, unlike lto_codegen_add_module.
+ * It will hold onto the module until the user calls
+ * lto_codegen_link_gathered_modules_and_dispose(). The lto_module_t
+ * should now by owned by the lto_code_gen_t, and will be freed when
+ * the link is done.
+ */
+extern bool
+lto_codegen_gather_module_for_link(lto_code_gen_t cg, lto_module_t mod);
+/**
+ * Merges modules that are part of the set of modules gathered by
+ * lto_codegen_gather_module_for_link(), and the also destroys the modules
+ * as lto_module_dispose() would.
+ */
+extern bool
+lto_codegen_link_gathered_modules_and_dispose(lto_code_gen_t cg);
+/* @LOCALMOD-END*/
/**
* Sets if debug info should be generated.