1//===-- Regions.def - Metadata about MemRegion kinds ------------*- 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// The list of regions (MemRegion sub-classes) used in the Static Analyzer. 11// In order to use this information, users of this file must define one or more 12// of the three macros: 13// 14// REGION(Id, Parent) - for specific MemRegion sub-classes, reserving 15// enum value IdKind for their kind. 16// 17// ABSTRACT_REGION(Id, Parent) - for abstract region classes, 18// 19// REGION_RANGE(Id, First, Last) - for ranges of kind-enums, 20// allowing to determine abstract class of a region 21// based on the kind-enum value. 22// 23//===----------------------------------------------------------------------===// 24 25#ifndef REGION 26#define REGION(Id, Parent) 27#endif 28 29#ifndef ABSTRACT_REGION 30#define ABSTRACT_REGION(Id, Parent) 31#endif 32 33#ifndef REGION_RANGE 34#define REGION_RANGE(Id, First, Last) 35#endif 36 37ABSTRACT_REGION(MemSpaceRegion, MemRegion) 38 REGION(CodeSpaceRegion, MemSpaceRegion) 39 ABSTRACT_REGION(GlobalsSpaceRegion, MemSpaceRegion) 40 ABSTRACT_REGION(NonStaticGlobalSpaceRegion, GlobalsSpaceRegion) 41 REGION(GlobalImmutableSpaceRegion, NonStaticGlobalSpaceRegion) 42 REGION(GlobalInternalSpaceRegion, NonStaticGlobalSpaceRegion) 43 REGION(GlobalSystemSpaceRegion, NonStaticGlobalSpaceRegion) 44 REGION_RANGE(NON_STATIC_GLOBAL_MEMSPACES, GlobalImmutableSpaceRegionKind, 45 GlobalSystemSpaceRegionKind) 46 REGION(StaticGlobalSpaceRegion, MemSpaceRegion) 47 REGION_RANGE(GLOBAL_MEMSPACES, GlobalImmutableSpaceRegionKind, 48 StaticGlobalSpaceRegionKind) 49 REGION(HeapSpaceRegion, MemSpaceRegion) 50 ABSTRACT_REGION(StackSpaceRegion, MemSpaceRegion) 51 REGION(StackArgumentsSpaceRegion, StackSpaceRegion) 52 REGION(StackLocalsSpaceRegion, StackSpaceRegion) 53 REGION_RANGE(STACK_MEMSPACES, StackArgumentsSpaceRegionKind, 54 StackLocalsSpaceRegionKind) 55 REGION(UnknownSpaceRegion, MemSpaceRegion) 56 REGION_RANGE(MEMSPACES, CodeSpaceRegionKind, 57 UnknownSpaceRegionKind) 58ABSTRACT_REGION(SubRegion, MemRegion) 59 REGION(AllocaRegion, SubRegion) 60 REGION(SymbolicRegion, SubRegion) 61 ABSTRACT_REGION(TypedRegion, SubRegion) 62 REGION(BlockDataRegion, TypedRegion) 63 ABSTRACT_REGION(CodeTextRegion, TypedRegion) 64 REGION(BlockCodeRegion, CodeTextRegion) 65 REGION(FunctionCodeRegion, CodeTextRegion) 66 REGION_RANGE(CODE_TEXT_REGIONS, BlockCodeRegionKind, 67 FunctionCodeRegionKind) 68 ABSTRACT_REGION(TypedValueRegion, TypedRegion) 69 REGION(CompoundLiteralRegion, TypedValueRegion) 70 REGION(CXXBaseObjectRegion, TypedValueRegion) 71 REGION(CXXTempObjectRegion, TypedValueRegion) 72 REGION(CXXThisRegion, TypedValueRegion) 73 ABSTRACT_REGION(DeclRegion, TypedValueRegion) 74 REGION(FieldRegion, DeclRegion) 75 REGION(ObjCIvarRegion, DeclRegion) 76 REGION(VarRegion, DeclRegion) 77 REGION_RANGE(DECL_REGIONS, FieldRegionKind, 78 VarRegionKind) 79 REGION(ElementRegion, TypedValueRegion) 80 REGION(ObjCStringRegion, TypedValueRegion) 81 REGION(StringRegion, TypedValueRegion) 82 REGION_RANGE(TYPED_VALUE_REGIONS, CompoundLiteralRegionKind, 83 StringRegionKind) 84 REGION_RANGE(TYPED_REGIONS, BlockDataRegionKind, 85 StringRegionKind) 86 87#undef REGION_RANGE 88#undef ABSTRACT_REGION 89#undef REGION 90