aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/FlowSensitive
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-09-16 18:44:52 +0000
committerTed Kremenek <kremenek@apple.com>2008-09-16 18:44:52 +0000
commitd452758bb6b59340528a26def9ecc24b329d4ecf (patch)
tree25346308283c18880c7584738c0907dec5968242 /include/clang/Analysis/FlowSensitive
parent3f61c18dd765c27bf900b22dc3a5f2a68e2364a1 (diff)
ProgramPoint now takes the space of two pointers instead of one. This change was
motivated because it became clear that the number of subclasses of ProgramPoint would expand and we ran out of bits to represent a pointer variant. As a plus of this change, BlockEdge program points can now be represented explicitly without using a cache of CFGBlock* pairs in CFG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56245 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/FlowSensitive')
-rw-r--r--include/clang/Analysis/FlowSensitive/DataflowSolver.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/clang/Analysis/FlowSensitive/DataflowSolver.h b/include/clang/Analysis/FlowSensitive/DataflowSolver.h
index b7cb1f8a06..169417c3d2 100644
--- a/include/clang/Analysis/FlowSensitive/DataflowSolver.h
+++ b/include/clang/Analysis/FlowSensitive/DataflowSolver.h
@@ -69,12 +69,12 @@ template <> struct ItrTraits<forward_analysis_tag> {
static StmtItr StmtBegin(const CFGBlock* B) { return B->begin(); }
static StmtItr StmtEnd(const CFGBlock* B) { return B->end(); }
- static BlockEdge PrevEdge(CFG& cfg, const CFGBlock* B, const CFGBlock* Prev) {
- return BlockEdge(cfg,Prev,B);
+ static BlockEdge PrevEdge(const CFGBlock* B, const CFGBlock* Prev) {
+ return BlockEdge(Prev, B);
}
- static BlockEdge NextEdge(CFG& cfg, const CFGBlock* B, const CFGBlock* Next) {
- return BlockEdge(cfg,B,Next);
+ static BlockEdge NextEdge(const CFGBlock* B, const CFGBlock* Next) {
+ return BlockEdge(B, Next);
}
};
@@ -92,12 +92,12 @@ template <> struct ItrTraits<backward_analysis_tag> {
static StmtItr StmtBegin(const CFGBlock* B) { return B->rbegin(); }
static StmtItr StmtEnd(const CFGBlock* B) { return B->rend(); }
- static BlockEdge PrevEdge(CFG& cfg, const CFGBlock* B, const CFGBlock* Prev) {
- return BlockEdge(cfg,B,Prev);
+ static BlockEdge PrevEdge(const CFGBlock* B, const CFGBlock* Prev) {
+ return BlockEdge(B, Prev);
}
- static BlockEdge NextEdge(CFG& cfg, const CFGBlock* B, const CFGBlock* Next) {
- return BlockEdge(cfg,Next,B);
+ static BlockEdge NextEdge(const CFGBlock* B, const CFGBlock* Next) {
+ return BlockEdge(Next, B);
}
};
} // end namespace dataflow
@@ -237,7 +237,7 @@ private:
for (PrevBItr I=ItrTraits::PrevBegin(B),E=ItrTraits::PrevEnd(B); I!=E; ++I){
typename EdgeDataMapTy::iterator EI =
- M.find(ItrTraits::PrevEdge(cfg,B,*I));
+ M.find(ItrTraits::PrevEdge(B, *I));
if (EI != M.end()) {
if (firstMerge) {
@@ -287,7 +287,7 @@ private:
// forward/backward analysis respectively)
void UpdateEdges(CFG& cfg, const CFGBlock* B, ValTy& V) {
for (NextBItr I=ItrTraits::NextBegin(B), E=ItrTraits::NextEnd(B); I!=E; ++I)
- UpdateEdgeValue(ItrTraits::NextEdge(cfg,B,*I),V,*I);
+ UpdateEdgeValue(ItrTraits::NextEdge(B, *I),V,*I);
}
/// UpdateEdgeValue - Update the value associated with a given edge.