[llvm-branch-commits] [cfe-branch] r71334 - in /cfe/branches/Apple/Dib: include/clang/Analysis/PathSensitive/GRCoreEngine.h include/clang/Analysis/ProgramPoint.h lib/Analysis/GRCoreEngine.cpp
Mike Stump
mrs at apple.com
Fri May 8 23:19:43 PDT 2009
Author: mrs
Date: Sat May 9 01:19:43 2009
New Revision: 71334
URL: http://llvm.org/viewvc/llvm-project?rev=71334&view=rev
Log:
Merge in 71280:
Make BlockEntrace program points taggable.
Modified:
cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRCoreEngine.h
cfe/branches/Apple/Dib/include/clang/Analysis/ProgramPoint.h
cfe/branches/Apple/Dib/lib/Analysis/GRCoreEngine.cpp
Modified: cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRCoreEngine.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRCoreEngine.h?rev=71334&r1=71333&r2=71334&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRCoreEngine.h (original)
+++ cfe/branches/Apple/Dib/include/clang/Analysis/PathSensitive/GRCoreEngine.h Sat May 9 01:19:43 2009
@@ -539,7 +539,9 @@
return getBlockCounter().getNumVisited(B.getBlockID());
}
- ExplodedNodeImpl* generateNodeImpl(const void* State);
+ ExplodedNodeImpl* generateNodeImpl(const void* State,
+ const void *tag = 0,
+ ExplodedNodeImpl *P = 0);
CFGBlock* getBlock() const { return &B; }
};
@@ -571,9 +573,13 @@
return getPredecessor()->getState();
}
- NodeTy* MakeNode(const StateTy* St) {
- return static_cast<NodeTy*>(NB.generateNodeImpl(St));
+ NodeTy* MakeNode(const StateTy* St, const void *tag = 0) {
+ return static_cast<NodeTy*>(NB.generateNodeImpl(St, tag));
}
+
+ NodeTy *generateNode(const StateTy *St, NodeTy *Pred, const void *tag = 0) {
+ return static_cast<NodeTy*>(NB.generateNodeImpl(St, tag, Pred));
+ }
};
Modified: cfe/branches/Apple/Dib/include/clang/Analysis/ProgramPoint.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/include/clang/Analysis/ProgramPoint.h?rev=71334&r1=71333&r2=71334&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/include/clang/Analysis/ProgramPoint.h (original)
+++ cfe/branches/Apple/Dib/include/clang/Analysis/ProgramPoint.h Sat May 9 01:19:43 2009
@@ -131,7 +131,8 @@
class BlockEntrance : public ProgramPoint {
public:
- BlockEntrance(const CFGBlock* B) : ProgramPoint(B, BlockEntranceKind) {}
+ BlockEntrance(const CFGBlock* B, const void *tag = 0)
+ : ProgramPoint(B, BlockEntranceKind, tag) {}
CFGBlock* getBlock() const {
return reinterpret_cast<CFGBlock*>(getData1NoMask());
Modified: cfe/branches/Apple/Dib/lib/Analysis/GRCoreEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/Analysis/GRCoreEngine.cpp?rev=71334&r1=71333&r2=71334&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/lib/Analysis/GRCoreEngine.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Analysis/GRCoreEngine.cpp Sat May 9 01:19:43 2009
@@ -555,16 +555,17 @@
if (!HasGeneratedNode) generateNodeImpl(Pred->State);
}
-ExplodedNodeImpl* GREndPathNodeBuilderImpl::generateNodeImpl(const void* State){
- HasGeneratedNode = true;
-
+ExplodedNodeImpl*
+GREndPathNodeBuilderImpl::generateNodeImpl(const void* State,
+ const void *tag,
+ ExplodedNodeImpl* P) {
+ HasGeneratedNode = true;
bool IsNew;
ExplodedNodeImpl* Node =
- Eng.G->getNodeImpl(BlockEntrance(&B), State, &IsNew);
+ Eng.G->getNodeImpl(BlockEntrance(&B, tag), State, &IsNew);
-
- Node->addPredecessor(Pred);
+ Node->addPredecessor(P ? P : Pred);
if (IsNew) {
Node->markAsSink();
More information about the llvm-branch-commits
mailing list