2003-09-30 18:37:50 +00:00
|
|
|
//===-- llvm/Type.def - File that describes various LLVM types --*- C++ -*-===//
|
2003-10-20 20:19:47 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2001-09-10 20:06:17 +00:00
|
|
|
//
|
|
|
|
// This file contains descriptions of the various LLVM types and derived types.
|
|
|
|
// This file serves as a source of in source documentation and a can be
|
|
|
|
// #included to do something on all of the type definitions.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
// NOTE: NO INCLUDE GUARD DESIRED!
|
|
|
|
|
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
// If the user did not specify one of the macros, give a default noop defn.
|
2001-09-10 20:06:17 +00:00
|
|
|
//
|
|
|
|
#ifndef HANDLE_PRIM_TYPE
|
|
|
|
#define HANDLE_PRIM_TYPE(x,y)
|
|
|
|
#endif
|
|
|
|
#ifndef HANDLE_DERV_TYPE
|
|
|
|
#define HANDLE_DERV_TYPE(x,y)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// HANDLE_PRIM_TYPE - Parameterized #define that takes the following fields to
|
|
|
|
// declare a primitive type:
|
|
|
|
//
|
|
|
|
// Type Name: This is the symbolic name of the type, without the trailing Ty.
|
|
|
|
// Type Size: This is the size or precision of the type.
|
|
|
|
//
|
2002-05-06 15:10:15 +00:00
|
|
|
HANDLE_PRIM_TYPE(Void , 0)
|
2001-09-10 20:06:17 +00:00
|
|
|
HANDLE_PRIM_TYPE(Bool , 1)
|
|
|
|
HANDLE_PRIM_TYPE(SByte , 1)
|
|
|
|
HANDLE_PRIM_TYPE(UByte , 1)
|
|
|
|
HANDLE_PRIM_TYPE(Short , 2)
|
|
|
|
HANDLE_PRIM_TYPE(UShort, 2)
|
|
|
|
HANDLE_PRIM_TYPE(Int , 4)
|
|
|
|
HANDLE_PRIM_TYPE(UInt , 4)
|
|
|
|
HANDLE_PRIM_TYPE(Long , 8)
|
|
|
|
HANDLE_PRIM_TYPE(ULong , 8)
|
|
|
|
HANDLE_PRIM_TYPE(Float , 4)
|
|
|
|
HANDLE_PRIM_TYPE(Double, 8)
|
2002-05-06 15:10:15 +00:00
|
|
|
HANDLE_PRIM_TYPE(Label , 0)
|
2001-09-10 20:06:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
// HANDLE_DERV_TYPE - Parameterized #define that takes the following fields to
|
|
|
|
// declare a derived type:
|
|
|
|
//
|
|
|
|
// Type Name: This is the symbolic name of the type, without the trailing Ty.
|
|
|
|
// Class Name: This is the subclass that implements the derived type.
|
|
|
|
//
|
2002-03-29 03:44:36 +00:00
|
|
|
HANDLE_DERV_TYPE(Function, FunctionType)
|
|
|
|
HANDLE_DERV_TYPE(Array , ArrayType)
|
|
|
|
HANDLE_DERV_TYPE(Pointer , PointerType)
|
|
|
|
HANDLE_DERV_TYPE(Struct , StructType)
|
|
|
|
HANDLE_DERV_TYPE(Opaque , OpaqueType)
|
2004-08-20 06:00:58 +00:00
|
|
|
HANDLE_DERV_TYPE(Packed , PackedType)
|
2001-09-10 20:06:17 +00:00
|
|
|
|
|
|
|
// Kill the macros on exit...
|
|
|
|
#undef HANDLE_PRIM_TYPE
|
|
|
|
#undef HANDLE_DERV_TYPE
|