TypeNodes.def revision 8b6324149527bd141346c88b87560775c1514e7b
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//===----------------------------------------------------------------------===// 35 36#ifndef ABSTRACT_TYPE 37# define ABSTRACT_TYPE(Class, Base) TYPE(Class, Base) 38#endif 39 40#ifndef NON_CANONICAL_TYPE 41# define NON_CANONICAL_TYPE(Class, Base) TYPE(Class, Base) 42#endif 43 44#ifndef DEPENDENT_TYPE 45# define DEPENDENT_TYPE(Class, Base) TYPE(Class, Base) 46#endif 47 48TYPE(ExtQual, Type) 49TYPE(Builtin, Type) 50TYPE(FixedWidthInt, Type) 51TYPE(Complex, Type) 52TYPE(Pointer, Type) 53TYPE(BlockPointer, Type) 54ABSTRACT_TYPE(Reference, Type) 55TYPE(LValueReference, ReferenceType) 56TYPE(RValueReference, ReferenceType) 57TYPE(MemberPointer, Type) 58ABSTRACT_TYPE(Array, Type) 59TYPE(ConstantArray, ArrayType) 60TYPE(IncompleteArray, ArrayType) 61TYPE(VariableArray, ArrayType) 62DEPENDENT_TYPE(DependentSizedArray, ArrayType) 63TYPE(Vector, Type) 64TYPE(ExtVector, VectorType) 65ABSTRACT_TYPE(Function, Type) 66TYPE(FunctionProto, FunctionType) 67TYPE(FunctionNoProto, FunctionType) 68NON_CANONICAL_TYPE(Typedef, Type) 69NON_CANONICAL_TYPE(TypeOfExpr, Type) 70NON_CANONICAL_TYPE(TypeOf, Type) 71ABSTRACT_TYPE(Tag, Type) 72TYPE(Record, TagType) 73TYPE(Enum, TagType) 74DEPENDENT_TYPE(TemplateTypeParm, Type) 75TYPE(TemplateSpecialization, Type) 76NON_CANONICAL_TYPE(QualifiedName, Type) 77DEPENDENT_TYPE(Typename, Type) 78TYPE(ObjCInterface, Type) 79TYPE(ObjCQualifiedInterface, ObjCInterfaceType) 80TYPE(ObjCQualifiedId, Type) 81 82#undef DEPENDENT_TYPE 83#undef NON_CANONICAL_TYPE 84#undef ABSTRACT_TYPE 85#undef TYPE 86