summaryrefslogtreecommitdiffstats
path: root/clang/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
commit3c0c81a4d41086458c1c7f6f4316b684306d3c73 (patch)
treeb79c4b8d74e059d0bee2f743e7e961c44fceb602 /clang/lib/Checker/GRCoreEngine.cpp
parent917229cf75fe5ae07e351d430f86d9cbaec2516b (diff)
downloadbcm5719-llvm-3c0c81a4d41086458c1c7f6f4316b684306d3c73.tar.gz
bcm5719-llvm-3c0c81a4d41086458c1c7f6f4316b684306d3c73.zip
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. llvm-svn: 99255
Diffstat (limited to 'clang/lib/Checker/GRCoreEngine.cpp')
-rw-r--r--clang/lib/Checker/GRCoreEngine.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Checker/GRCoreEngine.cpp b/clang/lib/Checker/GRCoreEngine.cpp
index a9347d01641..e4ef6b0e106 100644
--- a/clang/lib/Checker/GRCoreEngine.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud