Deleted Added
full compact
ProgramPoint.h (198893) ProgramPoint.h (199482)
1//==- ProgramPoint.h - Program Points for Path-Sensitive Analysis --*- 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//===----------------------------------------------------------------------===//

--- 19 unchanged lines hidden (view full) ---

28class LocationContext;
29
30class ProgramPoint {
31public:
32 enum Kind { BlockEdgeKind,
33 BlockEntranceKind,
34 BlockExitKind,
35 PreStmtKind,
1//==- ProgramPoint.h - Program Points for Path-Sensitive Analysis --*- 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//===----------------------------------------------------------------------===//

--- 19 unchanged lines hidden (view full) ---

28class LocationContext;
29
30class ProgramPoint {
31public:
32 enum Kind { BlockEdgeKind,
33 BlockEntranceKind,
34 BlockExitKind,
35 PreStmtKind,
36 // Keep the following together and in this order.
37 PostStmtKind,
36 PostStmtKind,
38 PostLocationChecksSucceedKind,
39 PostOutOfBoundsCheckFailedKind,
40 PostNullCheckFailedKind,
41 PostUndefLocationCheckFailedKind,
37 PreLoadKind,
42 PostLoadKind,
38 PostLoadKind,
39 PreStoreKind,
43 PostStoreKind,
44 PostPurgeDeadSymbolsKind,
45 PostStmtCustomKind,
46 PostLValueKind,
47 MinPostStmtKind = PostStmtKind,
48 MaxPostStmtKind = PostLValueKind };
49
50private:

--- 138 unchanged lines hidden (view full) ---

189 : StmtPoint(S, NULL, PostStmtKind, L, tag) {}
190
191 static bool classof(const ProgramPoint* Location) {
192 unsigned k = Location->getKind();
193 return k >= MinPostStmtKind && k <= MaxPostStmtKind;
194 }
195};
196
40 PostStoreKind,
41 PostPurgeDeadSymbolsKind,
42 PostStmtCustomKind,
43 PostLValueKind,
44 MinPostStmtKind = PostStmtKind,
45 MaxPostStmtKind = PostLValueKind };
46
47private:

--- 138 unchanged lines hidden (view full) ---

186 : StmtPoint(S, NULL, PostStmtKind, L, tag) {}
187
188 static bool classof(const ProgramPoint* Location) {
189 unsigned k = Location->getKind();
190 return k >= MinPostStmtKind && k <= MaxPostStmtKind;
191 }
192};
193
197class PostLocationChecksSucceed : public PostStmt {
198public:
199 PostLocationChecksSucceed(const Stmt* S, const LocationContext *L,
200 const void *tag = 0)
201 : PostStmt(S, PostLocationChecksSucceedKind, L, tag) {}
202
203 static bool classof(const ProgramPoint* Location) {
204 return Location->getKind() == PostLocationChecksSucceedKind;
205 }
206};
207
208class PostStmtCustom : public PostStmt {
209public:
210 PostStmtCustom(const Stmt* S,
211 const std::pair<const void*, const void*>* TaggedData,\
212 const LocationContext *L)
213 : PostStmt(S, TaggedData, PostStmtCustomKind, L) {}
214
215 const std::pair<const void*, const void*>& getTaggedPair() const {

--- 5 unchanged lines hidden (view full) ---

221
222 const void* getTaggedData() const { return getTaggedPair().second; }
223
224 static bool classof(const ProgramPoint* Location) {
225 return Location->getKind() == PostStmtCustomKind;
226 }
227};
228
194class PostStmtCustom : public PostStmt {
195public:
196 PostStmtCustom(const Stmt* S,
197 const std::pair<const void*, const void*>* TaggedData,\
198 const LocationContext *L)
199 : PostStmt(S, TaggedData, PostStmtCustomKind, L) {}
200
201 const std::pair<const void*, const void*>& getTaggedPair() const {

--- 5 unchanged lines hidden (view full) ---

207
208 const void* getTaggedData() const { return getTaggedPair().second; }
209
210 static bool classof(const ProgramPoint* Location) {
211 return Location->getKind() == PostStmtCustomKind;
212 }
213};
214
229class PostOutOfBoundsCheckFailed : public PostStmt {
230public:
231 PostOutOfBoundsCheckFailed(const Stmt* S, const LocationContext *L,
232 const void *tag = 0)
233 : PostStmt(S, PostOutOfBoundsCheckFailedKind, L, tag) {}
234
235 static bool classof(const ProgramPoint* Location) {
236 return Location->getKind() == PostOutOfBoundsCheckFailedKind;
215
216class LocationCheck : public StmtPoint {
217protected:
218 LocationCheck(const Stmt *S, const LocationContext *L,
219 ProgramPoint::Kind K, const void *tag)
220 : StmtPoint(S, NULL, K, L, tag) {}
221
222 static bool classof(const ProgramPoint *location) {
223 unsigned k = location->getKind();
224 return k == PreLoadKind || k == PreStoreKind;
237 }
238};
225 }
226};
239
240class PostUndefLocationCheckFailed : public PostStmt {
227
228class PreLoad : public LocationCheck {
241public:
229public:
242 PostUndefLocationCheckFailed(const Stmt* S, const LocationContext *L,
243 const void *tag = 0)
244 : PostStmt(S, PostUndefLocationCheckFailedKind, L, tag) {}
245
246 static bool classof(const ProgramPoint* Location) {
247 return Location->getKind() == PostUndefLocationCheckFailedKind;
230 PreLoad(const Stmt *S, const LocationContext *L, const void *tag = 0)
231 : LocationCheck(S, L, PreLoadKind, tag) {}
232
233 static bool classof(const ProgramPoint *location) {
234 return location->getKind() == PreLoadKind;
248 }
249};
250
235 }
236};
237
251class PostNullCheckFailed : public PostStmt {
238class PreStore : public LocationCheck {
252public:
239public:
253 PostNullCheckFailed(const Stmt* S, const LocationContext *L,
254 const void *tag = 0)
255 : PostStmt(S, PostNullCheckFailedKind, L, tag) {}
256
257 static bool classof(const ProgramPoint* Location) {
258 return Location->getKind() == PostNullCheckFailedKind;
240 PreStore(const Stmt *S, const LocationContext *L, const void *tag = 0)
241 : LocationCheck(S, L, PreStoreKind, tag) {}
242
243 static bool classof(const ProgramPoint *location) {
244 return location->getKind() == PreStoreKind;
259 }
260};
261
262class PostLoad : public PostStmt {
263public:
264 PostLoad(const Stmt* S, const LocationContext *L, const void *tag = 0)
265 : PostStmt(S, PostLoadKind, L, tag) {}
266

--- 90 unchanged lines hidden ---
245 }
246};
247
248class PostLoad : public PostStmt {
249public:
250 PostLoad(const Stmt* S, const LocationContext *L, const void *tag = 0)
251 : PostStmt(S, PostLoadKind, L, tag) {}
252

--- 90 unchanged lines hidden ---