<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 24, 2015, at 5:08 PM, Hans Wennborg <<a href="mailto:hans@chromium.org" class="">hans@chromium.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Tue, Feb 24, 2015 at 4:59 PM, Filip Pizlo <</span><a href="mailto:fpizlo@apple.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">fpizlo@apple.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">> wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Good idea.  I'll incorporate it into my patch.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">How does that help users using LLVMLinkerPreserveSource?</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div>Compiler error indicating that they are using something that has no effect.</div><div><br class=""></div><div>-Filip</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class="">On Feb 24, 2015, at 4:59 PM, Rafael EspĂ­ndola <<a href="mailto:rafael.espindola@gmail.com" class="">rafael.espindola@gmail.com</a>> wrote:<br class=""><br class="">Should we name LLVMLinkerPreserveSource something like<br class="">LLVMLinkerPreserveSourceRemoved?<br class=""><br class="">On 24 February 2015 at 18:46, Filip Pizlo <<a href="mailto:fpizlo@apple.com" class="">fpizlo@apple.com</a>> wrote:<br class=""><blockquote type="cite" class="">Proposed fix:<br class=""><br class=""><br class=""><br class=""><br class="">OK to commit?<br class=""><br class="">-Filip<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Feb 24, 2015, at 3:39 PM, Filip Pizlo <<a href="mailto:fpizlo@apple.com" class="">fpizlo@apple.com</a>> wrote:<br class=""><br class="">This change breaks the WebKit build.<br class=""><br class="">The removal of the LLVMLinkerMode type from the C API violates the principle of C API stability.  The latest release of LLVM has this type, which makes it subject to the usual API stability rules.<br class=""><br class="">What do you recommend we do?  Maybe just bringing back the enum is sufficient.<br class=""><br class="">-Filip<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Dec 23, 2014, at 11:16 AM, Rafael Espindola <<a href="mailto:rafael.espindola@gmail.com" class="">rafael.espindola@gmail.com</a>> wrote:<br class=""><br class="">Author: rafael<br class="">Date: Tue Dec 23 13:16:45 2014<br class="">New Revision: 224782<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=224782&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=224782&view=rev</a><br class="">Log:<br class="">Finish removing DestroySource.<br class=""><br class="">Fixes pr21901.<br class=""><br class="">Modified:<br class="">llvm/trunk/bindings/go/llvm/linker.go<br class="">llvm/trunk/bindings/ocaml/linker/linker_ocaml.c<br class="">llvm/trunk/bindings/ocaml/linker/llvm_linker.ml<br class="">llvm/trunk/bindings/ocaml/linker/llvm_linker.mli<br class="">llvm/trunk/include/llvm-c/Linker.h<br class="">llvm/trunk/lib/Linker/LinkModules.cpp<br class="">llvm/trunk/test/Bindings/OCaml/linker.ml<br class=""><br class="">Modified: llvm/trunk/bindings/go/llvm/linker.go<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/linker.go?rev=224782&r1=224781&r2=224782&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/go/llvm/linker.go?rev=224782&r1=224781&r2=224782&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/bindings/go/llvm/linker.go (original)<br class="">+++ llvm/trunk/bindings/go/llvm/linker.go Tue Dec 23 13:16:45 2014<br class="">@@ -20,16 +20,9 @@ package llvm<br class="">import "C"<br class="">import "errors"<br class=""><br class="">-type LinkerMode C.LLVMLinkerMode<br class="">-<br class="">-const (<br class="">-    LinkerDestroySource  = C.LLVMLinkerDestroySource<br class="">-    LinkerPreserveSource = C.LLVMLinkerPreserveSource<br class="">-)<br class="">-<br class="">-func LinkModules(Dest, Src Module, Mode LinkerMode) error {<br class="">+func LinkModules(Dest, Src Module) error {<br class="">   var cmsg *C.char<br class="">-    failed := C.LLVMLinkModules(Dest.C, Src.C, C.LLVMLinkerMode(Mode), &cmsg)<br class="">+    failed := C.LLVMLinkModules(Dest.C, Src.C, 0, &cmsg)<br class="">   if failed != 0 {<br class="">           err := errors.New(C.GoString(cmsg))<br class="">           C.LLVMDisposeMessage(cmsg)<br class=""><br class="">Modified: llvm/trunk/bindings/ocaml/linker/linker_ocaml.c<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/linker/linker_ocaml.c?rev=224782&r1=224781&r2=224782&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/linker/linker_ocaml.c?rev=224782&r1=224781&r2=224782&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/bindings/ocaml/linker/linker_ocaml.c (original)<br class="">+++ llvm/trunk/bindings/ocaml/linker/linker_ocaml.c Tue Dec 23 13:16:45 2014<br class="">@@ -23,11 +23,11 @@<br class=""><br class="">void llvm_raise(value Prototype, char *Message);<br class=""><br class="">-/* llmodule -> llmodule -> Mode.t -> unit */<br class="">-CAMLprim value llvm_link_modules(LLVMModuleRef Dst, LLVMModuleRef Src, value Mode) {<br class="">+/* llmodule -> llmodule -> unit */<br class="">+CAMLprim value llvm_link_modules(LLVMModuleRef Dst, LLVMModuleRef Src) {<br class="">char* Message;<br class=""><br class="">-  if (LLVMLinkModules(Dst, Src, Int_val(Mode), &Message))<br class="">+  if (LLVMLinkModules(Dst, Src, 0, &Message))<br class=""> llvm_raise(*caml_named_value("Llvm_linker.Error"), Message);<br class=""><br class="">return Val_unit;<br class=""><br class="">Modified: llvm/trunk/bindings/ocaml/linker/llvm_linker.ml<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/linker/llvm_linker.ml?rev=224782&r1=224781&r2=224782&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/linker/llvm_linker.ml?rev=224782&r1=224781&r2=224782&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/bindings/ocaml/linker/llvm_linker.ml (original)<br class="">+++ llvm/trunk/bindings/ocaml/linker/llvm_linker.ml Tue Dec 23 13:16:45 2014<br class="">@@ -11,11 +11,5 @@ exception Error of string<br class=""><br class="">let () = Callback.register_exception "Llvm_linker.Error" (Error "")<br class=""><br class="">-module Mode = struct<br class="">-  type t =<br class="">-  | DestroySource<br class="">-  | PreserveSource<br class="">-end<br class="">-<br class="">-external link_modules : Llvm.llmodule -> Llvm.llmodule -> Mode.t -> unit<br class="">+external link_modules : Llvm.llmodule -> Llvm.llmodule -> unit<br class="">                   = "llvm_link_modules"<br class=""><br class="">Modified: llvm/trunk/bindings/ocaml/linker/llvm_linker.mli<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/linker/llvm_linker.mli?rev=224782&r1=224781&r2=224782&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/linker/llvm_linker.mli?rev=224782&r1=224781&r2=224782&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/bindings/ocaml/linker/llvm_linker.mli (original)<br class="">+++ llvm/trunk/bindings/ocaml/linker/llvm_linker.mli Tue Dec 23 13:16:45 2014<br class="">@@ -14,13 +14,6 @@<br class=""><br class="">exception Error of string<br class=""><br class="">-(** Linking mode. *)<br class="">-module Mode : sig<br class="">-  type t =<br class="">-  | DestroySource<br class="">-  | PreserveSource<br class="">-end<br class="">-<br class="">(** [link_modules dst src mode] links [src] into [dst], raising [Error]<br class=""> if the linking fails. *)<br class="">-val link_modules : Llvm.llmodule -> Llvm.llmodule -> Mode.t -> unit<br class="">\ No newline at end of file<br class="">+val link_modules : Llvm.llmodule -> Llvm.llmodule -> unit<br class="">\ No newline at end of file<br class=""><br class="">Modified: llvm/trunk/include/llvm-c/Linker.h<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Linker.h?rev=224782&r1=224781&r2=224782&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Linker.h?rev=224782&r1=224781&r2=224782&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/include/llvm-c/Linker.h (original)<br class="">+++ llvm/trunk/include/llvm-c/Linker.h Tue Dec 23 13:16:45 2014<br class="">@@ -20,20 +20,13 @@<br class="">extern "C" {<br class="">#endif<br class=""><br class="">-<br class="">-typedef enum {<br class="">-  LLVMLinkerDestroySource = 0, /* Allow source module to be destroyed. */<br class="">-  LLVMLinkerPreserveSource = 1 /* Preserve the source module. */<br class="">-} LLVMLinkerMode;<br class="">-<br class="">-<br class="">/* Links the source module into the destination module, taking ownership<br class="">* of the source module away from the caller. Optionally returns a<br class="">* human-readable description of any errors that occurred in linking.<br class="">* OutMessage must be disposed with LLVMDisposeMessage. The return value<br class="">* is true if an error occurred, false otherwise. */<br class="">LLVMBool LLVMLinkModules(LLVMModuleRef Dest, LLVMModuleRef Src,<br class="">-                         LLVMLinkerMode Mode, char **OutMessage);<br class="">+                         unsigned Unused, char **OutMessage);<br class=""><br class="">#ifdef __cplusplus<br class="">}<br class=""><br class="">Modified: llvm/trunk/lib/Linker/LinkModules.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=224782&r1=224781&r2=224782&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=224782&r1=224781&r2=224782&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Linker/LinkModules.cpp (original)<br class="">+++ llvm/trunk/lib/Linker/LinkModules.cpp Tue Dec 23 13:16:45 2014<br class="">@@ -1739,7 +1739,7 @@ bool Linker::LinkModules(Module *Dest, M<br class="">//===----------------------------------------------------------------------===//<br class=""><br class="">LLVMBool LLVMLinkModules(LLVMModuleRef Dest, LLVMModuleRef Src,<br class="">-                         LLVMLinkerMode Mode, char **OutMessages) {<br class="">+                         unsigned Unused, char **OutMessages) {<br class="">Module *D = unwrap(Dest);<br class="">std::string Message;<br class="">raw_string_ostream Stream(Message);<br class=""><br class="">Modified: llvm/trunk/test/Bindings/OCaml/linker.ml<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/OCaml/linker.ml?rev=224782&r1=224781&r2=224782&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/OCaml/linker.ml?rev=224782&r1=224781&r2=224782&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/Bindings/OCaml/linker.ml (original)<br class="">+++ llvm/trunk/test/Bindings/OCaml/linker.ml Tue Dec 23 13:16:45 2014<br class="">@@ -45,7 +45,7 @@ let test_linker () =<br class=""><br class="">let m1 = make_module "one"<br class="">and m2 = make_module "two" in<br class="">-  link_modules m1 m2 Mode.DestroySource;<br class="">+  link_modules m1 m2;<br class="">dispose_module m1;<br class=""><br class="">let m1 = make_module "one"<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br class=""></blockquote><br class=""><br class=""></blockquote></blockquote><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></div></blockquote></div><br class=""></body></html>