llvm.org GIT mirror llvm / acc1d12
LTO: Export local context symbols Export symbols in libLTO.dylib for the local context-related functions added in r221733 (`LTO_API_VERSION=11`)... and add the missing definition for `lto_codegen_create_in_local_context()`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224567 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 4 years ago
2 changed file(s) with 16 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1313
1414 #include "llvm-c/lto.h"
1515 #include "llvm/CodeGen/CommandFlags.h"
16 #include "llvm/IR/LLVMContext.h"
1617 #include "llvm/LTO/LTOCodeGenerator.h"
1718 #include "llvm/LTO/LTOModule.h"
1819 #include "llvm/Support/MemoryBuffer.h"
212213 unwrap(cg)->setDiagnosticHandler(diag_handler, ctxt);
213214 }
214215
215 lto_code_gen_t lto_codegen_create(void) {
216 static lto_code_gen_t createCodeGen(bool InLocalContext) {
216217 lto_initialize();
217218
218219 TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
219220
220 LTOCodeGenerator *CodeGen = new LTOCodeGenerator();
221 LTOCodeGenerator *CodeGen =
222 InLocalContext ? new LTOCodeGenerator(make_unique())
223 : new LTOCodeGenerator();
221224 if (CodeGen)
222225 CodeGen->setTargetOptions(Options);
223226 return wrap(CodeGen);
227 }
228
229 lto_code_gen_t lto_codegen_create(void) {
230 return createCodeGen(/* InLocalContext */ false);
231 }
232
233 lto_code_gen_t lto_codegen_create_in_local_context(void) {
234 return createCodeGen(/* InLocalContext */ true);
224235 }
225236
226237 void lto_codegen_dispose(lto_code_gen_t cg) { delete unwrap(cg); }
55 lto_module_create_from_fd_at_offset
66 lto_module_create_from_memory
77 lto_module_create_from_memory_with_path
8 lto_module_create_in_local_context
9 lto_module_create_in_codegen_context
810 lto_module_get_deplib
911 lto_module_get_linkeropt
1012 lto_module_get_num_deplibs
2426 lto_codegen_add_must_preserve_symbol
2527 lto_codegen_compile
2628 lto_codegen_create
29 lto_codegen_create_in_local_context
2730 lto_codegen_dispose
2831 lto_codegen_set_debug_model
2932 lto_codegen_set_pic_model