Lines Matching refs:unwrap
150 LTOCodeGenerator *CG = unwrap(cg); in DEFINE_SIMPLE_CONVERSION_FUNCTIONS()
292 unwrap(cg)->getContext(), mem, length, Options, StringRef(path)); in lto_module_create_in_codegen_context()
296 void lto_module_dispose(lto_module_t mod) { delete unwrap(mod); } in lto_module_dispose()
299 return unwrap(mod)->getTargetTriple().c_str(); in lto_module_get_target_triple()
303 return unwrap(mod)->setTargetTriple(StringRef(triple)); in lto_module_set_target_triple()
307 return unwrap(mod)->getSymbolCount(); in lto_module_get_num_symbols()
311 return unwrap(mod)->getSymbolName(index).data(); in lto_module_get_symbol_name()
316 return unwrap(mod)->getSymbolAttributes(index); in lto_module_get_symbol_attribute()
320 return unwrap(mod)->getLinkerOpts().data(); in lto_module_get_linkeropts()
326 LTOModule *M = unwrap(mod); in lto_module_get_macho_cputype()
347 unwrap(cg)->setDiagnosticHandler(diag_handler, ctxt); in lto_codegen_set_diagnostic_handler()
370 void lto_codegen_dispose(lto_code_gen_t cg) { delete unwrap(cg); } in lto_codegen_dispose()
373 return !unwrap(cg)->addModule(unwrap(mod)); in lto_codegen_add_module()
377 unwrap(cg)->setModule(std::unique_ptr<LTOModule>(unwrap(mod))); in lto_codegen_set_module()
381 unwrap(cg)->setDebugInfo(debug); in lto_codegen_set_debug_model()
388 unwrap(cg)->setCodePICModel(Reloc::Static); in lto_codegen_set_pic_model()
391 unwrap(cg)->setCodePICModel(Reloc::PIC_); in lto_codegen_set_pic_model()
394 unwrap(cg)->setCodePICModel(Reloc::DynamicNoPIC); in lto_codegen_set_pic_model()
397 unwrap(cg)->setCodePICModel(None); in lto_codegen_set_pic_model()
405 return unwrap(cg)->setCpu(cpu); in lto_codegen_set_cpu()
419 unwrap(cg)->addMustPreserveSymbol(symbol); in lto_codegen_add_must_preserve_symbol()
425 unwrap(cg)->parseCodeGenDebugOptions(); in maybeParseOptions()
433 return !unwrap(cg)->writeMergedModules(path); in lto_codegen_write_merged_modules()
438 LibLTOCodeGenerator *CG = unwrap(cg); in lto_codegen_compile()
448 return !unwrap(cg)->optimize(); in lto_codegen_optimize()
453 LibLTOCodeGenerator *CG = unwrap(cg); in lto_codegen_compile_optimized()
463 return !unwrap(cg)->compile_to_file(name); in lto_codegen_compile_to_file()
487 unwrap(cg)->setCodeGenDebugOptions(Options); in lto_codegen_debug_options()
497 unwrap(cg)->setCodeGenDebugOptions(makeArrayRef(Options)); in lto_codegen_debug_options_array()
504 unwrap(cg)->setShouldInternalize(ShouldInternalize); in lto_codegen_set_should_internalize()
509 unwrap(cg)->setShouldEmbedUselists(ShouldEmbedUselists); in lto_codegen_set_should_embed_uselists()
513 return unwrap(mod)->hasCtorDtor(); in lto_module_has_ctor_dtor()
547 void thinlto_codegen_dispose(thinlto_code_gen_t cg) { delete unwrap(cg); } in thinlto_codegen_dispose()
551 unwrap(cg)->addModule(Identifier, StringRef(Data, Length)); in thinlto_codegen_add_module()
554 void thinlto_codegen_process(thinlto_code_gen_t cg) { unwrap(cg)->run(); } in thinlto_codegen_process()
557 return unwrap(cg)->getProducedBinaries().size(); in thinlto_module_get_num_objects()
561 assert(index < unwrap(cg)->getProducedBinaries().size() && "Index overflow"); in thinlto_module_get_object()
562 auto &MemBuffer = unwrap(cg)->getProducedBinaries()[index]; in thinlto_module_get_object()
568 return unwrap(cg)->getProducedBinaryFiles().size(); in thinlto_module_get_num_object_files()
572 assert(index < unwrap(cg)->getProducedBinaryFiles().size() && in thinlto_module_get_object_file()
574 return unwrap(cg)->getProducedBinaryFiles()[index].c_str(); in thinlto_module_get_object_file()
579 unwrap(cg)->disableCodeGen(disable); in thinlto_codegen_disable_codegen()
584 unwrap(cg)->setCodeGenOnly(CodeGenOnly); in thinlto_codegen_set_codegen_only()
597 return unwrap(mod)->isThinLTO(); in lto_module_is_thinlto()
602 unwrap(cg)->preserveSymbol(StringRef(Name, Length)); in thinlto_codegen_add_must_preserve_symbol()
607 unwrap(cg)->crossReferenceSymbol(StringRef(Name, Length)); in thinlto_codegen_add_cross_referenced_symbol()
611 return unwrap(cg)->setCpu(cpu); in thinlto_codegen_set_cpu()
616 return unwrap(cg)->setCacheDir(cache_dir); in thinlto_codegen_set_cache_dir()
621 return unwrap(cg)->setCachePruningInterval(interval); in thinlto_codegen_set_cache_pruning_interval()
626 return unwrap(cg)->setCacheEntryExpiration(expiration); in thinlto_codegen_set_cache_entry_expiration()
631 return unwrap(cg)->setMaxCacheSizeRelativeToAvailableSpace(Percentage); in thinlto_codegen_set_final_cache_size_relative_to_available_space()
636 return unwrap(cg)->setCacheMaxSizeBytes(MaxSizeBytes); in thinlto_codegen_set_cache_size_bytes()
643 return unwrap(cg)->setCacheMaxSizeBytes(MaxSizeBytes); in thinlto_codegen_set_cache_size_megabytes()
648 return unwrap(cg)->setCacheMaxSizeFiles(MaxSizeFiles); in thinlto_codegen_set_cache_size_files()
653 return unwrap(cg)->setSaveTempsDir(save_temps_dir); in thinlto_codegen_set_savetemps_dir()
658 unwrap(cg)->setGeneratedObjectsDirectory(save_temps_dir); in thinlto_set_generated_objects_dir()
665 unwrap(cg)->setCodePICModel(Reloc::Static); in thinlto_codegen_set_pic_model()
668 unwrap(cg)->setCodePICModel(Reloc::PIC_); in thinlto_codegen_set_pic_model()
671 unwrap(cg)->setCodePICModel(Reloc::DynamicNoPIC); in thinlto_codegen_set_pic_model()
674 unwrap(cg)->setCodePICModel(None); in thinlto_codegen_set_pic_model()
688 delete unwrap(input); in lto_input_dispose()
692 return LTOModule::getDependentLibraryCount(unwrap(input)); in lto_input_get_num_dependent_libraries()
698 return LTOModule::getDependentLibrary(unwrap(input), index, size); in lto_input_get_dependent_library()