blob: e9f94ab09bfcca3e8eecf2ebb74b74dd5c369db2 [file] [log] [blame]
//===--- TypeCheckRequestPayloads.def - Type Checking Payloads --*- 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 file defines the kinds of payloads that can be stored within a
// TypeCheckRequest. It is designed to be included multiple times with
// different definitions of the TYPE_CHECK_REQUEST_PAYLOAD(Name,Type)
// macro, whose parameters are:
//
// Name: The name of the payload.
// Type: The type of the payload.
//
// Note that the TYPE_CHECK_REQUEST_PAYLOAD macro should always be
// defined as a variadic macro, e.g.,
//
// \code
// #define TYPE_CHECK_REQUEST_PAYLOAD(PayloadName,...)
// \endcode
//
// So that __VA_ARGS__ can capture the type, which may include commas.
//===----------------------------------------------------------------------===//
#if !defined(TYPE_CHECK_REQUEST_PAYLOAD)
# error define TYPE_CHECK_REQUEST_PAYLOAD before including this file
#endif
TYPE_CHECK_REQUEST_PAYLOAD(Class, ClassDecl *)
TYPE_CHECK_REQUEST_PAYLOAD(Enum, EnumDecl *)
TYPE_CHECK_REQUEST_PAYLOAD(InheritedClauseEntry, std::pair<llvm::PointerUnion<TypeDecl *, ExtensionDecl *>, unsigned>)
TYPE_CHECK_REQUEST_PAYLOAD(Protocol, ProtocolDecl *)
TYPE_CHECK_REQUEST_PAYLOAD(DeclContextLookup, DeclContextLookupInfo)
TYPE_CHECK_REQUEST_PAYLOAD(TypeResolution, std::tuple<TypeRepr *, DeclContext *, unsigned>)
TYPE_CHECK_REQUEST_PAYLOAD(TypeDeclResolution, TypeDecl *)
#undef TYPE_CHECK_REQUEST_PAYLOAD