clang: include/clang/Analysis/FlowSensitive/Value.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_VALUE_H
15#define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_VALUE_H
16
20#include "llvm/ADT/DenseMap.h"
21#include "llvm/ADT/StringMap.h"
22#include "llvm/ADT/StringRef.h"
23#include
24#include
25
27namespace dataflow {
28
29
30
31
32
34public:
38
39
43 };
44
45 explicit Value(Kind ValKind) : ValKind(ValKind) {}
46
47
48
49
52
54
56
57
58
60 return Properties.lookup(Name);
61 }
62
63
64
65
66
67
69 Properties.insert_or_assign(Name, &Val);
70 }
71
72 llvm::iterator_range<llvm::StringMap<Value *>::const_iterator>
74 return {Properties.begin(), Properties.end()};
75 }
76
77private:
79 llvm::StringMap<Value *> Properties;
80};
81
82
83
84
85
86
87
88
89
90
92
93
96
97public:
99 : Value(ValueKind), F(&F) {}
100
105 }
106
108};
109
110
111
112
113
114
115
117public:
120 }
121
124 }
125
127};
128
129
130
131
132
134public:
137 }
138
141 }
142
144};
145
146
148public:
152 }
153
156 }
157};
158
159
161public:
163
166 }
167};
168
169
171public:
174
177 }
178
180
181private:
183};
184
185raw_ostream &operator<<(raw_ostream &OS, const Value &Val);
186
187}
188}
189
190#endif
Models an atomic boolean.
AtomicBoolValue(const Formula &F)
static bool classof(const Value *Val)
BoolValue(Kind ValueKind, const Formula &F)
const Formula & formula() const
static bool classof(const Value *Val)
Models a compound boolean formula.
FormulaBoolValue(const Formula &F)
static bool classof(const Value *Val)
@ AtomRef
A reference to an atomic boolean variable.
static bool classof(const Value *Val)
Models a symbolic pointer. Specifically, any value of type T*.
PointerValue(StorageLocation &PointeeLoc)
StorageLocation & getPointeeLoc() const
static bool classof(const Value *Val)
Base class for elements of the local variable store and of the heap.
A TopBoolValue represents a boolean that is explicitly unconstrained.
TopBoolValue(const Formula &F)
static bool classof(const Value *Val)
Base class for all values computed by abstract interpretation.
Value(const Value &)=delete
Value * getProperty(llvm::StringRef Name) const
Returns the value of the synthetic property with the given Name or null if the property isn't assigne...
void setProperty(llvm::StringRef Name, Value &Val)
Assigns Val as the value of the synthetic property with the given Name.
Value & operator=(const Value &)=delete
llvm::iterator_range< llvm::StringMap< Value * >::const_iterator > properties() const
Atom
Identifies an atomic boolean variable such as "V1".
bool areEquivalentValues(const Value &Val1, const Value &Val2)
An equivalence relation for values.
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, Atom A)
The JSON file list parser is used to communicate input to InstallAPI.