//===-- TypeLocNodes.def - Metadata about TypeLoc wrappers ------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//  This file defines the TypeLoc info database. Each node is
//  enumerated by providing its name (e.g., "PointerLoc" or "ArrayLoc"),
//  base class (e.g., "TypeSpecLoc" or "DeclaratorLoc"), and the Type subclass
//  that the TypeLoc is associated with.
//
//    TYPELOC(Class, Base) - A TypeLoc subclass.
//
//    UNQUAL_TYPELOC(Class, Base, Type) - An UnqualTypeLoc subclass.
//
//    ABSTRACT_TYPELOC(Class) - Refers to TypeSpecLoc and DeclaratorLoc.
//
//    TYPESPEC_TYPELOC(Class, Type) - A TypeLoc referring to a type-spec type.
//
//    DECLARATOR_TYPELOC(Class, Type) - A TypeLoc referring to a type part of
//    a declarator, excluding type-spec types.
//
//===----------------------------------------------------------------------===//

#ifndef UNQUAL_TYPELOC
#  define UNQUAL_TYPELOC(Class, Base, Type) TYPELOC(Class, Base)
#endif

#ifndef ABSTRACT_TYPELOC
#  define ABSTRACT_TYPELOC(Class) TYPELOC(Class, TypeLoc)
#endif

#ifndef TYPESPEC_TYPELOC
#  define TYPESPEC_TYPELOC(Class, Type) UNQUAL_TYPELOC(Class, TypeSpecLoc, Type)
#endif

#ifndef DECLARATOR_TYPELOC
#  define DECLARATOR_TYPELOC(Class, Type) UNQUAL_TYPELOC(Class, DeclaratorLoc, Type)
#endif

TYPESPEC_TYPELOC(DefaultTypeSpecLoc, Type)
TYPESPEC_TYPELOC(TypedefLoc, TypedefType)
TYPESPEC_TYPELOC(ObjCInterfaceLoc, ObjCInterfaceType)
TYPESPEC_TYPELOC(ObjCProtocolListLoc, ObjCProtocolListType)
DECLARATOR_TYPELOC(PointerLoc, PointerType)
DECLARATOR_TYPELOC(BlockPointerLoc, BlockPointerType)
DECLARATOR_TYPELOC(MemberPointerLoc, MemberPointerType)
DECLARATOR_TYPELOC(ReferenceLoc, ReferenceType)
DECLARATOR_TYPELOC(FunctionLoc, FunctionType)
DECLARATOR_TYPELOC(ArrayLoc, ArrayType)
ABSTRACT_TYPELOC(DeclaratorLoc)
ABSTRACT_TYPELOC(TypeSpecLoc)
TYPELOC(QualifiedLoc, TypeLoc)


#undef DECLARATOR_TYPELOC
#undef TYPESPEC_TYPELOC
#undef ABSTRACT_TYPELOC
#undef UNQUAL_TYPELOC
#undef TYPELOC
