mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
An upcoming change has the SIL Optimizer drop the [fragile] attribute from the specialized callee, unless the caller is itself [fragile]. Since we need to distinguish specializations from fragile and non-fragile contexts, add a new mangling node to represent this concept.
170 lines
4.4 KiB
C++
170 lines
4.4 KiB
C++
//===--- DemangleNodes.def - Demangling Tree Metaprogramming ----*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See http://swift.org/LICENSE.txt for license information
|
|
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines macros useful for macro-metaprogramming with nodes in
|
|
// the demangling tree.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
/// NODE(ID)
|
|
/// The node's enumerator value is Node::Kind::ID.
|
|
|
|
/// CONTEXT_NODE(ID)
|
|
/// Nodes that can serve as contexts for other entities.
|
|
#ifndef CONTEXT_NODE
|
|
#define CONTEXT_NODE(ID) NODE(ID)
|
|
#endif
|
|
|
|
CONTEXT_NODE(Allocator)
|
|
NODE(Archetype)
|
|
NODE(ArchetypeRef)
|
|
NODE(ArgumentTuple)
|
|
NODE(AssociatedType)
|
|
NODE(AssociatedTypeRef)
|
|
NODE(AssociatedTypeMetadataAccessor)
|
|
NODE(AssociatedTypeWitnessTableAccessor)
|
|
NODE(AutoClosureType)
|
|
NODE(BoundGenericClass)
|
|
NODE(BoundGenericEnum)
|
|
NODE(BoundGenericStructure)
|
|
NODE(BuiltinTypeName)
|
|
NODE(CFunctionPointer)
|
|
CONTEXT_NODE(Class)
|
|
CONTEXT_NODE(Constructor)
|
|
CONTEXT_NODE(Deallocator)
|
|
NODE(DeclContext)
|
|
CONTEXT_NODE(DefaultArgumentInitializer)
|
|
NODE(DependentAssociatedTypeRef)
|
|
NODE(DependentGenericSignature)
|
|
NODE(DependentGenericParamCount)
|
|
NODE(DependentGenericConformanceRequirement)
|
|
NODE(DependentGenericSameTypeRequirement)
|
|
NODE(DependentGenericType)
|
|
NODE(DependentMemberType)
|
|
NODE(DependentGenericParamType)
|
|
CONTEXT_NODE(Destructor)
|
|
CONTEXT_NODE(DidSet)
|
|
NODE(Directness)
|
|
NODE(DynamicAttribute)
|
|
NODE(DirectMethodReferenceAttribute)
|
|
NODE(DynamicSelf)
|
|
CONTEXT_NODE(Enum)
|
|
NODE(ErrorType)
|
|
NODE(ExistentialMetatype)
|
|
CONTEXT_NODE(ExplicitClosure)
|
|
CONTEXT_NODE(Extension)
|
|
NODE(FieldOffset)
|
|
NODE(FullTypeMetadata)
|
|
CONTEXT_NODE(Function)
|
|
NODE(FunctionSignatureSpecialization)
|
|
NODE(FunctionSignatureSpecializationParam)
|
|
NODE(FunctionSignatureSpecializationParamKind)
|
|
NODE(FunctionSignatureSpecializationParamPayload)
|
|
NODE(FunctionType)
|
|
NODE(Generics)
|
|
NODE(GenericProtocolWitnessTable)
|
|
NODE(GenericProtocolWitnessTableInstantiationFunction)
|
|
NODE(GenericSpecialization)
|
|
NODE(GenericSpecializationNotReAbstracted)
|
|
NODE(GenericSpecializationParam)
|
|
NODE(GenericType)
|
|
NODE(GenericTypeMetadataPattern)
|
|
CONTEXT_NODE(Getter)
|
|
NODE(Global)
|
|
CONTEXT_NODE(GlobalGetter)
|
|
NODE(Identifier)
|
|
NODE(Index)
|
|
CONTEXT_NODE(IVarInitializer)
|
|
CONTEXT_NODE(IVarDestroyer)
|
|
NODE(ImplConvention)
|
|
NODE(ImplFunctionAttribute)
|
|
NODE(ImplFunctionType)
|
|
CONTEXT_NODE(ImplicitClosure)
|
|
NODE(ImplParameter)
|
|
NODE(ImplResult)
|
|
NODE(ImplErrorResult)
|
|
NODE(InOut)
|
|
NODE(InfixOperator)
|
|
CONTEXT_NODE(Initializer)
|
|
NODE(LazyProtocolWitnessTableAccessor)
|
|
NODE(LazyProtocolWitnessTableCacheVariable)
|
|
NODE(LocalDeclName)
|
|
CONTEXT_NODE(MaterializeForSet)
|
|
NODE(Metatype)
|
|
NODE(MetatypeRepresentation)
|
|
NODE(Metaclass)
|
|
CONTEXT_NODE(Module)
|
|
CONTEXT_NODE(NativeOwningAddressor)
|
|
CONTEXT_NODE(NativeOwningMutableAddressor)
|
|
CONTEXT_NODE(NativePinningAddressor)
|
|
CONTEXT_NODE(NativePinningMutableAddressor)
|
|
NODE(NominalTypeDescriptor)
|
|
NODE(NonObjCAttribute)
|
|
NODE(NonVariadicTuple)
|
|
NODE(Number)
|
|
NODE(ObjCAttribute)
|
|
NODE(ObjCBlock)
|
|
CONTEXT_NODE(OwningAddressor)
|
|
CONTEXT_NODE(OwningMutableAddressor)
|
|
NODE(PartialApplyForwarder)
|
|
NODE(PartialApplyObjCForwarder)
|
|
NODE(PostfixOperator)
|
|
NODE(PrefixOperator)
|
|
NODE(PrivateDeclName)
|
|
CONTEXT_NODE(Protocol)
|
|
NODE(ProtocolConformance)
|
|
NODE(ProtocolDescriptor)
|
|
NODE(ProtocolList)
|
|
NODE(ProtocolWitness)
|
|
NODE(ProtocolWitnessTable)
|
|
NODE(ProtocolWitnessTableAccessor)
|
|
NODE(QualifiedArchetype)
|
|
NODE(ReabstractionThunk)
|
|
NODE(ReabstractionThunkHelper)
|
|
NODE(ReturnType)
|
|
NODE(SILBoxType)
|
|
NODE(SelfTypeRef)
|
|
CONTEXT_NODE(Setter)
|
|
NODE(SpecializationPassID)
|
|
NODE(SpecializationIsFragile)
|
|
CONTEXT_NODE(Static)
|
|
CONTEXT_NODE(Structure)
|
|
CONTEXT_NODE(Subscript)
|
|
NODE(Suffix)
|
|
NODE(ThinFunctionType)
|
|
NODE(TupleElement)
|
|
NODE(TupleElementName)
|
|
NODE(Type)
|
|
NODE(TypeAlias)
|
|
NODE(TypeList)
|
|
NODE(TypeMangling)
|
|
NODE(TypeMetadata)
|
|
NODE(TypeMetadataAccessFunction)
|
|
NODE(TypeMetadataLazyCache)
|
|
NODE(UncurriedFunctionType)
|
|
NODE(Unmanaged)
|
|
NODE(Unowned)
|
|
CONTEXT_NODE(UnsafeAddressor)
|
|
CONTEXT_NODE(UnsafeMutableAddressor)
|
|
NODE(ValueWitness)
|
|
NODE(ValueWitnessTable)
|
|
CONTEXT_NODE(Variable)
|
|
NODE(VariadicTuple)
|
|
NODE(VTableAttribute)
|
|
NODE(Weak)
|
|
CONTEXT_NODE(WillSet)
|
|
NODE(WitnessTableOffset)
|
|
NODE(ThrowsAnnotation)
|
|
|
|
#undef CONTEXT_NODE
|
|
#undef NODE
|