1 //===-- llvm/Type.def - File that describes various LLVM types --*- C++ -*-===//
3 // This file contains descriptions of the various LLVM types and derived types.
4 // This file serves as a source of in source documentation and a can be
5 // #included to do something on all of the type definitions.
7 //===----------------------------------------------------------------------===//
9 // NOTE: NO INCLUDE GUARD DESIRED!
12 // If the user didn't specify one of the macros, give a default noop defn.
14 #ifndef HANDLE_PRIM_TYPE
15 #define HANDLE_PRIM_TYPE(x,y)
17 #ifndef HANDLE_DERV_TYPE
18 #define HANDLE_DERV_TYPE(x,y)
22 // HANDLE_PRIM_TYPE - Parameterized #define that takes the following fields to
23 // declare a primitive type:
25 // Type Name: This is the symbolic name of the type, without the trailing Ty.
26 // Type Size: This is the size or precision of the type.
28 HANDLE_PRIM_TYPE(Void , 0)
29 HANDLE_PRIM_TYPE(Bool , 1)
30 HANDLE_PRIM_TYPE(SByte , 1)
31 HANDLE_PRIM_TYPE(UByte , 1)
32 HANDLE_PRIM_TYPE(Short , 2)
33 HANDLE_PRIM_TYPE(UShort, 2)
34 HANDLE_PRIM_TYPE(Int , 4)
35 HANDLE_PRIM_TYPE(UInt , 4)
36 HANDLE_PRIM_TYPE(Long , 8)
37 HANDLE_PRIM_TYPE(ULong , 8)
38 HANDLE_PRIM_TYPE(Float , 4)
39 HANDLE_PRIM_TYPE(Double, 8)
40 HANDLE_PRIM_TYPE(Type , 0)
41 HANDLE_PRIM_TYPE(Label , 0)
44 // HANDLE_DERV_TYPE - Parameterized #define that takes the following fields to
45 // declare a derived type:
47 // Type Name: This is the symbolic name of the type, without the trailing Ty.
48 // Class Name: This is the subclass that implements the derived type.
50 HANDLE_DERV_TYPE(Function, FunctionType)
51 HANDLE_DERV_TYPE(Array , ArrayType)
52 HANDLE_DERV_TYPE(Pointer , PointerType)
53 HANDLE_DERV_TYPE(Struct , StructType)
54 HANDLE_DERV_TYPE(Opaque , OpaqueType)
56 // Kill the macros on exit...
57 #undef HANDLE_PRIM_TYPE
58 #undef HANDLE_DERV_TYPE