| 1 | //===-- TypeLocNodes.def - Metadata about TypeLoc wrappers ------*- C++ -*-===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file defines the TypeLoc info database. Each node is |
| 10 | // enumerated by providing its core name (e.g., "Pointer" for "PointerTypeLoc") |
| 11 | // and base class (e.g., "DeclaratorLoc"). All nodes except QualifiedTypeLoc |
| 12 | // are associated |
| 13 | // |
| 14 | // TYPELOC(Class, Base) - A TypeLoc subclass. If UNQUAL_TYPELOC is |
| 15 | // provided, there will be exactly one of these, Qualified. |
| 16 | // |
| 17 | // UNQUAL_TYPELOC(Class, Base, Type) - An UnqualTypeLoc subclass. |
| 18 | // |
| 19 | // ABSTRACT_TYPELOC(Class) - Refers to TypeSpecLoc and DeclaratorLoc. |
| 20 | // |
| 21 | //===----------------------------------------------------------------------===// |
| 22 | |
| 23 | #ifndef UNQUAL_TYPELOC |
| 24 | # define UNQUAL_TYPELOC(Class, Base) TYPELOC(Class, Base) |
| 25 | #endif |
| 26 | |
| 27 | #ifndef ABSTRACT_TYPELOC |
| 28 | # define ABSTRACT_TYPELOC(Class, Base) UNQUAL_TYPELOC(Class, Base) |
| 29 | #endif |
| 30 | |
| 31 | TYPELOC(Qualified, TypeLoc) |
| 32 | #define TYPE(Class, Base) UNQUAL_TYPELOC(Class, Base##Loc) |
| 33 | #define ABSTRACT_TYPE(Class, Base) ABSTRACT_TYPELOC(Class, Base##Loc) |
| 34 | #include "clang/AST/TypeNodes.def" |
| 35 | |
| 36 | #undef DECLARATOR_TYPELOC |
| 37 | #undef TYPESPEC_TYPELOC |
| 38 | #undef ABSTRACT_TYPELOC |
| 39 | #undef UNQUAL_TYPELOC |
| 40 | #undef TYPELOC |
| 41 | |