Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 pmbaty 1
//===-- Regions.def - Metadata about MemRegion kinds ------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// The list of regions (MemRegion sub-classes) used in the Static Analyzer.
10
// In order to use this information, users of this file must define one or more
11
// of the three macros:
12
//
13
// REGION(Id, Parent) - for specific MemRegion sub-classes, reserving
14
// enum value IdKind for their kind.
15
//
16
// ABSTRACT_REGION(Id, Parent) - for abstract region classes,
17
//
18
// REGION_RANGE(Id, First, Last) - for ranges of kind-enums,
19
// allowing to determine abstract class of a region
20
// based on the kind-enum value.
21
//
22
//===----------------------------------------------------------------------===//
23
 
24
#ifndef REGION
25
#define REGION(Id, Parent)
26
#endif
27
 
28
#ifndef ABSTRACT_REGION
29
#define ABSTRACT_REGION(Id, Parent)
30
#endif
31
 
32
#ifndef REGION_RANGE
33
#define REGION_RANGE(Id, First, Last)
34
#endif
35
 
36
ABSTRACT_REGION(MemSpaceRegion, MemRegion)
37
  REGION(CodeSpaceRegion, MemSpaceRegion)
38
  ABSTRACT_REGION(GlobalsSpaceRegion, MemSpaceRegion)
39
    ABSTRACT_REGION(NonStaticGlobalSpaceRegion, GlobalsSpaceRegion)
40
      REGION(GlobalImmutableSpaceRegion, NonStaticGlobalSpaceRegion)
41
      REGION(GlobalInternalSpaceRegion, NonStaticGlobalSpaceRegion)
42
      REGION(GlobalSystemSpaceRegion, NonStaticGlobalSpaceRegion)
43
      REGION_RANGE(NON_STATIC_GLOBAL_MEMSPACES, GlobalImmutableSpaceRegionKind,
44
                                                GlobalSystemSpaceRegionKind)
45
    REGION(StaticGlobalSpaceRegion, MemSpaceRegion)
46
    REGION_RANGE(GLOBAL_MEMSPACES, GlobalImmutableSpaceRegionKind,
47
                                   StaticGlobalSpaceRegionKind)
48
  REGION(HeapSpaceRegion, MemSpaceRegion)
49
  ABSTRACT_REGION(StackSpaceRegion, MemSpaceRegion)
50
    REGION(StackArgumentsSpaceRegion, StackSpaceRegion)
51
    REGION(StackLocalsSpaceRegion, StackSpaceRegion)
52
    REGION_RANGE(STACK_MEMSPACES, StackArgumentsSpaceRegionKind,
53
                                  StackLocalsSpaceRegionKind)
54
  REGION(UnknownSpaceRegion, MemSpaceRegion)
55
  REGION_RANGE(MEMSPACES, CodeSpaceRegionKind,
56
                          UnknownSpaceRegionKind)
57
ABSTRACT_REGION(SubRegion, MemRegion)
58
  REGION(AllocaRegion, SubRegion)
59
  REGION(SymbolicRegion, SubRegion)
60
  ABSTRACT_REGION(TypedRegion, SubRegion)
61
    REGION(BlockDataRegion, TypedRegion)
62
    ABSTRACT_REGION(CodeTextRegion, TypedRegion)
63
      REGION(BlockCodeRegion, CodeTextRegion)
64
      REGION(FunctionCodeRegion, CodeTextRegion)
65
      REGION_RANGE(CODE_TEXT_REGIONS, BlockCodeRegionKind,
66
                                      FunctionCodeRegionKind)
67
    ABSTRACT_REGION(TypedValueRegion, TypedRegion)
68
      REGION(CompoundLiteralRegion, TypedValueRegion)
69
      REGION(CXXBaseObjectRegion, TypedValueRegion)
70
      REGION(CXXDerivedObjectRegion, TypedValueRegion)
71
      REGION(CXXTempObjectRegion, TypedValueRegion)
72
      REGION(CXXThisRegion, TypedValueRegion)
73
      ABSTRACT_REGION(DeclRegion, TypedValueRegion)
74
        REGION(FieldRegion, DeclRegion)
75
        REGION(ObjCIvarRegion, DeclRegion)
76
        ABSTRACT_REGION(VarRegion, DeclRegion)
77
          REGION(NonParamVarRegion, VarRegion)
78
          REGION(ParamVarRegion, VarRegion)
79
        REGION_RANGE(VAR_REGIONS, NonParamVarRegionKind,
80
                                  ParamVarRegionKind)
81
      REGION_RANGE(DECL_REGIONS, FieldRegionKind,
82
                                 ParamVarRegionKind)
83
      REGION(ElementRegion, TypedValueRegion)
84
      REGION(ObjCStringRegion, TypedValueRegion)
85
      REGION(StringRegion, TypedValueRegion)
86
      REGION_RANGE(TYPED_VALUE_REGIONS, CompoundLiteralRegionKind,
87
                                        StringRegionKind)
88
    REGION_RANGE(TYPED_REGIONS, BlockDataRegionKind,
89
                                StringRegionKind)
90
 
91
#undef REGION_RANGE
92
#undef ABSTRACT_REGION
93
#undef REGION