llvm.org GIT mirror llvm / 1475142
Use a module to group calling convention values, too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45236 91177308-0d34-0410-b5e6-96231b3b80d8 Gordon Henriksen 12 years ago
3 changed file(s) with 17 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
5454 | Protected
5555 end
5656
57 let ccc = 0
58 let fastcc = 8
59 let coldcc = 9
60 let x86_stdcallcc = 64
61 let x86_fastcallcc = 65
57 module CallConv = struct
58 let c = 0
59 let fast = 8
60 let cold = 9
61 let x86_stdcall = 64
62 let x86_fastcall = 65
63 end
6264
6365 module Icmp = struct
6466 type t =
9494 (* The following calling convention values may be accessed with
9595 [function_call_conv f] and [set_function_call_conv conv f]. Calling
9696 conventions are open-ended. *)
97 val ccc : int (** [ccc] is the C calling convention. **)
98 val fastcc : int (** [fastcc] is the calling convention to allow LLVM
97 module CallConv : sig
98 val c : int (** [c] is the C calling convention. **)
99 val fast : int (** [fast] is the calling convention to allow LLVM
99100 maximum optimization opportunities. Use only with
100101 internal linkage. **)
101 val coldcc : int (** [coldcc] is the calling convention for
102 val cold : int (** [cold] is the calling convention for
102103 callee-save. **)
103 val x86_stdcallcc : int (** [x86_stdcallcc] is the familiar stdcall calling
104 val x86_stdcall : int (** [x86_stdcall] is the familiar stdcall calling
104105 convention from C. **)
105 val x86_fastcallcc : int (** [x86_fastcallcc] is the familiar fastcall calling
106 val x86_fastcall : int (** [x86_fastcall] is the familiar fastcall calling
106107 convention from C. **)
108 end
107109
108110 (** The predicate for an integer comparison ([icmp]) instruction.
109111 See the [llvm::ICmpInst::Predicate] enumeration. **)
495495 *)
496496 group "callconv";
497497 let fn = define_function "Fn5" ty m in
498 insist (ccc = function_call_conv fn);
499 set_function_call_conv fastcc fn;
500 insist (fastcc = function_call_conv fn);
498 insist (CallConv.c = function_call_conv fn);
499 set_function_call_conv CallConv.fast fn;
500 insist (CallConv.fast = function_call_conv fn);
501501 ignore (build_unreachable (builder_at_end (entry_block fn)));
502502
503503 begin group "collector";