]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/clang/AST/TypeNodes.def
Updaet clang to 92395.
[FreeBSD/FreeBSD.git] / include / clang / AST / TypeNodes.def
1 //===-- TypeNodes.def - Metadata about Type AST nodes -----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 //  This file defines the AST type info database. Each type node is
11 //  enumerated by providing its name (e.g., "Builtin" or "Enum") and
12 //  base class (e.g., "Type" or "TagType"). Depending on where in the
13 //  abstract syntax tree the type will show up, the enumeration uses
14 //  one of four different macros:
15 //
16 //    TYPE(Class, Base) - A type that can show up anywhere in the AST,
17 //    and might be dependent, canonical, or non-canonical. All clients
18 //    will need to understand these types.
19 //
20 //    ABSTRACT_TYPE(Class, Base) - An abstract class that shows up in
21 //    the type hierarchy but has no concrete instances.
22 //
23 //    NON_CANONICAL_TYPE(Class, Base) - A type that can show up
24 //    anywhere in the AST but will never be a part of a canonical
25 //    type. Clients that only need to deal with canonical types
26 //    (ignoring, e.g., typedefs and other type alises used for
27 //    pretty-printing) can ignore these types.
28 //
29 //    DEPENDENT_TYPE(Class, Base) - A type that will only show up
30 //    within a C++ template that has not been instantiated, e.g., a
31 //    type that is always dependent. Clients that do not need to deal
32 //    with uninstantiated C++ templates can ignore these types.
33 //
34 //  There is a fifth macro, independent of the others.  Most clients
35 //  will not need to use it.
36 //
37 //    LEAF_TYPE(Class) - A type that never has inner types.  Clients
38 //    which can operate on such types more efficiently may wish to do so.
39 //
40 //===----------------------------------------------------------------------===//
41
42 #ifndef ABSTRACT_TYPE
43 #  define ABSTRACT_TYPE(Class, Base) TYPE(Class, Base)
44 #endif
45
46 #ifndef NON_CANONICAL_TYPE
47 #  define NON_CANONICAL_TYPE(Class, Base) TYPE(Class, Base)
48 #endif
49
50 #ifndef DEPENDENT_TYPE
51 #  define DEPENDENT_TYPE(Class, Base) TYPE(Class, Base)
52 #endif
53
54 TYPE(Builtin, Type)
55 TYPE(Complex, Type)
56 TYPE(Pointer, Type)
57 TYPE(BlockPointer, Type)
58 ABSTRACT_TYPE(Reference, Type)
59 TYPE(LValueReference, ReferenceType)
60 TYPE(RValueReference, ReferenceType)
61 TYPE(MemberPointer, Type)
62 ABSTRACT_TYPE(Array, Type)
63 TYPE(ConstantArray, ArrayType)
64 TYPE(IncompleteArray, ArrayType)
65 TYPE(VariableArray, ArrayType)
66 DEPENDENT_TYPE(DependentSizedArray, ArrayType)
67 DEPENDENT_TYPE(DependentSizedExtVector, Type)
68 TYPE(Vector, Type)
69 TYPE(ExtVector, VectorType)
70 ABSTRACT_TYPE(Function, Type)
71 TYPE(FunctionProto, FunctionType)
72 TYPE(FunctionNoProto, FunctionType)
73 DEPENDENT_TYPE(UnresolvedUsing, Type)
74 NON_CANONICAL_TYPE(Typedef, Type)
75 NON_CANONICAL_TYPE(TypeOfExpr, Type)
76 NON_CANONICAL_TYPE(TypeOf, Type)
77 NON_CANONICAL_TYPE(Decltype, Type)
78 ABSTRACT_TYPE(Tag, Type)
79 TYPE(Record, TagType)
80 TYPE(Enum, TagType)
81 NON_CANONICAL_TYPE(Elaborated, Type)
82 DEPENDENT_TYPE(TemplateTypeParm, Type)
83 NON_CANONICAL_TYPE(SubstTemplateTypeParm, Type)
84 TYPE(TemplateSpecialization, Type)
85 NON_CANONICAL_TYPE(QualifiedName, Type)
86 DEPENDENT_TYPE(Typename, Type)
87 TYPE(ObjCInterface, Type)
88 TYPE(ObjCObjectPointer, Type)
89
90 // These types are always leaves in the type hierarchy.
91 #ifdef LEAF_TYPE
92 LEAF_TYPE(Enum)
93 LEAF_TYPE(Builtin)
94 LEAF_TYPE(ObjCInterface)
95 LEAF_TYPE(TemplateTypeParm)
96 #undef LEAF_TYPE
97 #endif
98
99 #undef DEPENDENT_TYPE
100 #undef NON_CANONICAL_TYPE
101 #undef ABSTRACT_TYPE
102 #undef TYPE