//===--- MetadataKind.def ---------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // This is a file that enables metaprogramming with metadata kinds. // //===----------------------------------------------------------------------===// /// METADATAKIND(Name, Value) /// Represents a swift native runtime metadata kind. Name is the Name of the /// metadata kind and Value is the integral value used to identify the value. #ifndef METADATAKIND #define METADATAKIND(Name, Value) #endif /// ABSTRACTMETADATAKIND(Name, Start, End) /// Represents an abstraction categorization of a range of metadata kind /// values. Name is the identifier of the range and Start, End are the /// beginning and end of the range. #ifndef ABSTRACTMETADATAKIND #define ABSTRACTMETADATAKIND(Name, Start, End) #endif /// NOMINALTYPEMETADATAKIND(Name, Value) /// Represents the native metadata kind for a swift nominal type. Name is the /// name of the kind and Value is the integral value used to identify the /// value. Delegates to METADATAKIND if not defined. #ifndef NOMINALTYPEMETADATAKIND #define NOMINALTYPEMETADATAKIND(Name, Value) METADATAKIND(Name, Value) #endif /// A class type. NOMINALTYPEMETADATAKIND(Class, 0) /// A struct type. NOMINALTYPEMETADATAKIND(Struct, 1) /// An enum type. /// If we add reference enums, that needs to go here. NOMINALTYPEMETADATAKIND(Enum, 2) /// An optional type. NOMINALTYPEMETADATAKIND(Optional, 3) /// A type whose value is not exposed in the metadata system. METADATAKIND(Opaque, 8) /// A tuple. METADATAKIND(Tuple, 9) /// A monomorphic function. METADATAKIND(Function, 10) /// An existential type. METADATAKIND(Existential, 12) /// A metatype. METADATAKIND(Metatype, 13) /// An ObjC class wrapper. METADATAKIND(ObjCClassWrapper, 14) /// An existential metatype. METADATAKIND(ExistentialMetatype, 15) /// A foreign class, such as a Core Foundation class. METADATAKIND(ForeignClass, 16) /// A heap-allocated local variable using statically-generated metadata. METADATAKIND(HeapLocalVariable, 64) /// A heap-allocated local variable using runtime-instantiated metadata. METADATAKIND(HeapGenericLocalVariable, 65) /// A native error object. METADATAKIND(ErrorObject, 128) // getEnumeratedMetadataKind assumes that all the enumerated values here // will be <= LastEnumeratedMetadataKind. #undef ABSTRACTMETADATAKIND #undef NOMINALTYPEMETADATAKIND #undef METADATAKIND