1 //===-- Regions.def - Metadata about MemRegion kinds ------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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:
14 // REGION(Id, Parent) - for specific MemRegion sub-classes, reserving
15 // enum value IdKind for their kind.
17 // ABSTRACT_REGION(Id, Parent) - for abstract region classes,
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.
23 //===----------------------------------------------------------------------===//
26 #define REGION(Id, Parent)
29 #ifndef ABSTRACT_REGION
30 #define ABSTRACT_REGION(Id, Parent)
34 #define REGION_RANGE(Id, First, Last)
37 ABSTRACT_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)
58 ABSTRACT_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,
79 REGION(ElementRegion, TypedValueRegion)
80 REGION(ObjCStringRegion, TypedValueRegion)
81 REGION(StringRegion, TypedValueRegion)
82 REGION_RANGE(TYPED_VALUE_REGIONS, CompoundLiteralRegionKind,
84 REGION_RANGE(TYPED_REGIONS, BlockDataRegionKind,
88 #undef ABSTRACT_REGION