Remove the use of "IncludeFile" from this support facility. The mechanism
[oota-llvm.git] / include / llvm / CallingConv.h
1 //===-- llvm/CallingConv.h - LLVM Calling Conventions -----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines LLVM's set of calling conventions. 
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_CALLINGCONV_H
15 #define LLVM_CALLINGCONV_H
16
17 namespace llvm {
18
19 /// CallingConv Namespace - This namespace contains an enum with a value for
20 /// the well-known calling conventions.
21 ///
22 namespace CallingConv {
23   /// A set of enums which specify the assigned numeric values for known llvm 
24   /// calling conventions.
25   /// @brief LLVM Calling Convention Representation
26   enum ID {
27     // C - The default llvm calling convention, compatible with C.  This
28     // convention is the only calling convention that supports varargs calls.
29     // As with typical C calling conventions, the callee/caller have to tolerate
30     // certain amounts of prototype mismatch.
31     C = 0,
32     
33     /// CSRet - C Struct Return calling convention.  This convention requires
34     /// that the function return void and take a pointer as the first argument
35     /// of the struct.  This is used by targets which need to distinguish
36     /// between C functions returning a structure, and C functions taking a
37     /// structure pointer as the first argument to the function.
38     CSRet = 1,
39
40
41     // Generic LLVM calling conventions.  None of these calling conventions
42     // support varargs calls, and all assume that the caller and callee
43     // prototype exactly match.
44
45     // Fast - This calling convention attempts to make calls as fast as possible
46     // (e.g. by passing things in registers).
47     Fast = 8,
48
49     // Cold - This calling convention attempts to make code in the caller as
50     // efficient as possible under the assumption that the call is not commonly
51     // executed.  As such, these calls often preserve all registers so that the
52     // call does not break any live ranges in the caller side.
53     Cold = 9,
54
55     // Target - This is the start of the target-specific calling conventions,
56     // e.g. fastcall and thiscall on X86.
57     FirstTargetCC = 64
58   };
59 } // End CallingConv namespace
60
61 } // End llvm namespace
62
63 #endif