1//===- llvm/IR/Metadata.def - Metadata definitions --------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// Macros for running through all types of metadata. 11// 12//===----------------------------------------------------------------------===// 13 14#if !(defined HANDLE_METADATA || defined HANDLE_METADATA_LEAF || \ 15 defined HANDLE_METADATA_BRANCH || defined HANDLE_MDNODE_LEAF || \ 16 defined HANDLE_MDNODE_BRANCH || \ 17 defined HANDLE_SPECIALIZED_MDNODE_LEAF || \ 18 defined HANDLE_SPECIALIZED_MDNODE_BRANCH) 19#error "Missing macro definition of HANDLE_METADATA*" 20#endif 21 22// Handler for all types of metadata. 23#ifndef HANDLE_METADATA 24#define HANDLE_METADATA(CLASS) 25#endif 26 27// Handler for leaf nodes in the class hierarchy. 28#ifndef HANDLE_METADATA_LEAF 29#define HANDLE_METADATA_LEAF(CLASS) HANDLE_METADATA(CLASS) 30#endif 31 32// Handler for non-leaf nodes in the class hierarchy. 33#ifndef HANDLE_METADATA_BRANCH 34#define HANDLE_METADATA_BRANCH(CLASS) HANDLE_METADATA(CLASS) 35#endif 36 37// Handler for leaf nodes under MDNode. 38#ifndef HANDLE_MDNODE_LEAF 39#define HANDLE_MDNODE_LEAF(CLASS) HANDLE_METADATA_LEAF(CLASS) 40#endif 41 42// Handler for non-leaf nodes under MDNode. 43#ifndef HANDLE_MDNODE_BRANCH 44#define HANDLE_MDNODE_BRANCH(CLASS) HANDLE_METADATA_BRANCH(CLASS) 45#endif 46 47// Handler for specialized leaf nodes under MDNode. 48#ifndef HANDLE_SPECIALIZED_MDNODE_LEAF 49#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) HANDLE_MDNODE_LEAF(CLASS) 50#endif 51 52// Handler for specialized non-leaf nodes under MDNode. 53#ifndef HANDLE_SPECIALIZED_MDNODE_BRANCH 54#define HANDLE_SPECIALIZED_MDNODE_BRANCH(CLASS) HANDLE_MDNODE_BRANCH(CLASS) 55#endif 56 57HANDLE_METADATA_LEAF(MDString) 58HANDLE_METADATA_BRANCH(ValueAsMetadata) 59HANDLE_METADATA_LEAF(ConstantAsMetadata) 60HANDLE_METADATA_LEAF(LocalAsMetadata) 61HANDLE_MDNODE_BRANCH(MDNode) 62HANDLE_MDNODE_LEAF(MDTuple) 63HANDLE_SPECIALIZED_MDNODE_LEAF(MDLocation) 64HANDLE_SPECIALIZED_MDNODE_LEAF(MDExpression) 65HANDLE_SPECIALIZED_MDNODE_BRANCH(DebugNode) 66HANDLE_SPECIALIZED_MDNODE_LEAF(GenericDebugNode) 67HANDLE_SPECIALIZED_MDNODE_LEAF(MDSubrange) 68HANDLE_SPECIALIZED_MDNODE_LEAF(MDEnumerator) 69HANDLE_SPECIALIZED_MDNODE_BRANCH(MDScope) 70HANDLE_SPECIALIZED_MDNODE_BRANCH(MDType) 71HANDLE_SPECIALIZED_MDNODE_LEAF(MDBasicType) 72HANDLE_SPECIALIZED_MDNODE_BRANCH(MDDerivedTypeBase) 73HANDLE_SPECIALIZED_MDNODE_LEAF(MDDerivedType) 74HANDLE_SPECIALIZED_MDNODE_BRANCH(MDCompositeTypeBase) 75HANDLE_SPECIALIZED_MDNODE_LEAF(MDCompositeType) 76HANDLE_SPECIALIZED_MDNODE_LEAF(MDSubroutineType) 77HANDLE_SPECIALIZED_MDNODE_LEAF(MDFile) 78HANDLE_SPECIALIZED_MDNODE_LEAF(MDCompileUnit) 79HANDLE_SPECIALIZED_MDNODE_BRANCH(MDLocalScope) 80HANDLE_SPECIALIZED_MDNODE_LEAF(MDSubprogram) 81HANDLE_SPECIALIZED_MDNODE_BRANCH(MDLexicalBlockBase) 82HANDLE_SPECIALIZED_MDNODE_LEAF(MDLexicalBlock) 83HANDLE_SPECIALIZED_MDNODE_LEAF(MDLexicalBlockFile) 84HANDLE_SPECIALIZED_MDNODE_LEAF(MDNamespace) 85HANDLE_SPECIALIZED_MDNODE_BRANCH(MDTemplateParameter) 86HANDLE_SPECIALIZED_MDNODE_LEAF(MDTemplateTypeParameter) 87HANDLE_SPECIALIZED_MDNODE_LEAF(MDTemplateValueParameter) 88HANDLE_SPECIALIZED_MDNODE_BRANCH(MDVariable) 89HANDLE_SPECIALIZED_MDNODE_LEAF(MDGlobalVariable) 90HANDLE_SPECIALIZED_MDNODE_LEAF(MDLocalVariable) 91HANDLE_SPECIALIZED_MDNODE_LEAF(MDObjCProperty) 92HANDLE_SPECIALIZED_MDNODE_LEAF(MDImportedEntity) 93 94#undef HANDLE_METADATA 95#undef HANDLE_METADATA_LEAF 96#undef HANDLE_METADATA_BRANCH 97#undef HANDLE_MDNODE_LEAF 98#undef HANDLE_MDNODE_BRANCH 99#undef HANDLE_SPECIALIZED_MDNODE_LEAF 100#undef HANDLE_SPECIALIZED_MDNODE_BRANCH 101