[llvm-commits] [llvm] r45236 - in /llvm/trunk: bindings/ocaml/llvm/llvm.ml bindings/ocaml/llvm/llvm.mli test/Bindings/Ocaml/vmcore.ml

Gordon Henriksen gordonhenriksen at mac.com
Wed Dec 19 16:13:27 PST 2007


Author: gordon
Date: Wed Dec 19 18:13:26 2007
New Revision: 45236

URL: http://llvm.org/viewvc/llvm-project?rev=45236&view=rev
Log:
Use a module to group calling convention values, too.

Modified:
    llvm/trunk/bindings/ocaml/llvm/llvm.ml
    llvm/trunk/bindings/ocaml/llvm/llvm.mli
    llvm/trunk/test/Bindings/Ocaml/vmcore.ml

Modified: llvm/trunk/bindings/ocaml/llvm/llvm.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.ml?rev=45236&r1=45235&r2=45236&view=diff

==============================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm.ml (original)
+++ llvm/trunk/bindings/ocaml/llvm/llvm.ml Wed Dec 19 18:13:26 2007
@@ -55,11 +55,13 @@
   | Protected
 end
 
-let ccc = 0
-let fastcc = 8
-let coldcc = 9
-let x86_stdcallcc = 64
-let x86_fastcallcc = 65
+module CallConv = struct
+  let c = 0
+  let fast = 8
+  let cold = 9
+  let x86_stdcall = 64
+  let x86_fastcall = 65
+end
 
 module Icmp = struct
   type t =

Modified: llvm/trunk/bindings/ocaml/llvm/llvm.mli
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm.mli?rev=45236&r1=45235&r2=45236&view=diff

==============================================================================
--- llvm/trunk/bindings/ocaml/llvm/llvm.mli (original)
+++ llvm/trunk/bindings/ocaml/llvm/llvm.mli Wed Dec 19 18:13:26 2007
@@ -95,16 +95,18 @@
 (* The following calling convention values may be accessed with
    [function_call_conv f] and [set_function_call_conv conv f]. Calling
    conventions are open-ended. *)
-val ccc : int             (** [ccc] is the C calling convention. **)
-val fastcc : int          (** [fastcc] is the calling convention to allow LLVM
+module CallConv : sig
+  val c : int             (** [c] is the C calling convention. **)
+  val fast : int          (** [fast] is the calling convention to allow LLVM
                               maximum optimization opportunities. Use only with
                               internal linkage. **)
-val coldcc : int          (** [coldcc] is the calling convention for
+  val cold : int          (** [cold] is the calling convention for
                               callee-save. **)
-val x86_stdcallcc : int   (** [x86_stdcallcc] is the familiar stdcall calling
+  val x86_stdcall : int   (** [x86_stdcall] is the familiar stdcall calling
                               convention from C. **)
-val x86_fastcallcc : int  (** [x86_fastcallcc] is the familiar fastcall calling
+  val x86_fastcall : int  (** [x86_fastcall] is the familiar fastcall calling
                               convention from C. **)
+end
 
 (** The predicate for an integer comparison ([icmp]) instruction.
     See the [llvm::ICmpInst::Predicate] enumeration. **)

Modified: llvm/trunk/test/Bindings/Ocaml/vmcore.ml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/vmcore.ml?rev=45236&r1=45235&r2=45236&view=diff

==============================================================================
--- llvm/trunk/test/Bindings/Ocaml/vmcore.ml (original)
+++ llvm/trunk/test/Bindings/Ocaml/vmcore.ml Wed Dec 19 18:13:26 2007
@@ -496,9 +496,9 @@
    *)
   group "callconv";
   let fn = define_function "Fn5" ty m in
-  insist (ccc = function_call_conv fn);
-  set_function_call_conv fastcc fn;
-  insist (fastcc = function_call_conv fn);
+  insist (CallConv.c = function_call_conv fn);
+  set_function_call_conv CallConv.fast fn;
+  insist (CallConv.fast = function_call_conv fn);
   ignore (build_unreachable (builder_at_end (entry_block fn)));
   
   begin group "collector";





More information about the llvm-commits mailing list