<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>One typo in the comment:</div><div>+ * Tells LTO optimization passes that a dynamic shared library is being<br>+ * built and this symbol may be exported. Unless IR semantics allow the symbol<br>+ * to be made local to the library, it <b>should</b> remain so it can be exported by the<br>+ * shared library.<br><br></div><div>Otherwise, LGTM.</div><div><br></div><div>-Nick</div><br>On Oct 3, 2013, at 8:43 AM, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br><blockquote type="cite"><blockquote type="cite">When a new API is added to llvm-c/lto.h, please bump LTO_API_VERSION<br>so that the linker can configure itself to use the new function.<br></blockquote><br>Done.<br><br><blockquote type="cite">But, is there a better name than “lto_codegen_add_symtab_symbol()”.  That<br>name has no obvious meaning.  All symbols are symbol table symbols…<br>I had to go back and re-read the email thread to figure out what it was<br>supposed to do again.<br><br>How about something like (existing plus new):<br><br>/**<br>* Tells LTO optimization passes that this symbol must be preserved<br>* because it is referenced by native code or a command line option.<br>*/<br>void lto_codegen_add_must_preserve_symbol(lto_code_gen_t cg, const char* symbol);<br><br>/**<br>* Tells LTO optimization passes that a dynamic shared library is being<br>* built which exports all global symbols by default.  And that unless C++<br>* semantics allow the symbol to be completely optimized away, it should<br>* remain so it can be exported by the shared library.<br>*/<br>void lto_codegen_add_dso_symbol(lto_code_gen_t cg, const char *symbol);<br></blockquote><br>I like it. I have propagated the s/symtab/dso/ name change and tweaked<br>some comments. A new patch is attached.<br><br>Cheers,<br>Rafael<br><span><t.patch></span><br></blockquote><br></body></html>