aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRCoreEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-03-23 05:05:02 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-03-23 05:05:02 +0000
commitd9e0c0fc47d5881a609ec34372d554e3652db66c (patch)
tree605da92604493dac0bcfce972b4736022cc63da3 /lib/Checker/GRCoreEngine.cpp
parentee5ab9f7a6368e516ab4e9eeadff0b2e9df03b34 (diff)
Since we now may have basicblocks with the same block is in different function,
change the block counter map from unsigned -> unsigned to <StackFrameContext*, unsigned> -> unsigned. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRCoreEngine.cpp')
-rw-r--r--lib/Checker/GRCoreEngine.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Checker/GRCoreEngine.cpp b/lib/Checker/GRCoreEngine.cpp
index a9347d0164..e4ef6b0e10 100644
--- a/lib/Checker/GRCoreEngine.cpp
+++ b/lib/Checker/GRCoreEngine.cpp
@@ -126,9 +126,9 @@ void GRCoreEngine::ProcessStmt(CFGElement E, GRStmtNodeBuilder& Builder) {
SubEngine.ProcessStmt(E, Builder);
}
-bool GRCoreEngine::ProcessBlockEntrance(CFGBlock* Blk, const GRState* State,
+bool GRCoreEngine::ProcessBlockEntrance(CFGBlock* Blk, const ExplodedNode *Pred,
GRBlockCounter BC) {
- return SubEngine.ProcessBlockEntrance(Blk, State, BC);
+ return SubEngine.ProcessBlockEntrance(Blk, Pred, BC);
}
void GRCoreEngine::ProcessBranch(Stmt* Condition, Stmt* Terminator,
@@ -256,7 +256,7 @@ void GRCoreEngine::HandleBlockEdge(const BlockEdge& L, ExplodedNode* Pred) {
// FIXME: Should we allow ProcessBlockEntrance to also manipulate state?
- if (ProcessBlockEntrance(Blk, Pred->State, WList->getBlockCounter()))
+ if (ProcessBlockEntrance(Blk, Pred, WList->getBlockCounter()))
GenerateNode(BlockEntrance(Blk, Pred->getLocationContext()), Pred->State, Pred);
}
@@ -265,7 +265,9 @@ void GRCoreEngine::HandleBlockEntrance(const BlockEntrance& L,
// Increment the block counter.
GRBlockCounter Counter = WList->getBlockCounter();
- Counter = BCounterFactory.IncrementCount(Counter, L.getBlock()->getBlockID());
+ Counter = BCounterFactory.IncrementCount(Counter,
+ Pred->getLocationContext()->getCurrentStackFrame(),
+ L.getBlock()->getBlockID());
WList->setBlockCounter(Counter);
// Process the entrance of the block.