aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-08-06 01:32:16 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-08-06 01:32:16 +0000
commitc5619d901a68dc27a9e310a6a831f03efebcd950 (patch)
tree182ee9df6e543f6a7cbb063fccb62ba1c3548932 /lib/Analysis/GRExprEngine.cpp
parenta10f7eabea651c5ba71569e69143dd77008f2a56 (diff)
As GRState seems general enough, it is time to merge some template classes
and their impl base classes. This can greatly simply some code of the core analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r--lib/Analysis/GRExprEngine.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 2f51170895..bf24248251 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -1298,11 +1298,11 @@ GRExprEngine::NodeTy* GRExprEngine::EvalLocation(Stmt* Ex, NodeTy* Pred,
// http://developer.apple.com/documentation/Darwin/Reference/Manpages/man3
// atomic.3.html
//
-static bool EvalOSAtomicCompareAndSwap(ExplodedNodeSet<GRState>& Dst,
+static bool EvalOSAtomicCompareAndSwap(ExplodedNodeSet& Dst,
GRExprEngine& Engine,
GRStmtNodeBuilder<GRState>& Builder,
CallExpr* CE, SVal L,
- ExplodedNode<GRState>* Pred) {
+ ExplodedNode* Pred) {
// Not enough arguments to match OSAtomicCompareAndSwap?
if (CE->getNumArgs() != 3)
@@ -1342,14 +1342,14 @@ static bool EvalOSAtomicCompareAndSwap(ExplodedNodeSet<GRState>& Dst,
// Load 'theValue'.
const GRState *state = Pred->getState();
- ExplodedNodeSet<GRState> Tmp;
+ ExplodedNodeSet Tmp;
SVal location = state->getSVal(theValueExpr);
Engine.EvalLoad(Tmp, theValueExpr, Pred, state, location, OSAtomicLoadTag);
- for (ExplodedNodeSet<GRState>::iterator I = Tmp.begin(), E = Tmp.end();
+ for (ExplodedNodeSet::iterator I = Tmp.begin(), E = Tmp.end();
I != E; ++I) {
- ExplodedNode<GRState> *N = *I;
+ ExplodedNode *N = *I;
const GRState *stateLoad = N->getState();
SVal theValueVal = stateLoad->getSVal(theValueExpr);
SVal oldValueVal = stateLoad->getSVal(oldValueExpr);
@@ -1368,7 +1368,7 @@ static bool EvalOSAtomicCompareAndSwap(ExplodedNodeSet<GRState>& Dst,
// Were they equal?
if (stateEqual) {
// Perform the store.
- ExplodedNodeSet<GRState> TmpStore;
+ ExplodedNodeSet TmpStore;
SVal val = stateEqual->getSVal(newValueExpr);
// Handle implicit value casts.
@@ -1383,9 +1383,9 @@ static bool EvalOSAtomicCompareAndSwap(ExplodedNodeSet<GRState>& Dst,
val, OSAtomicStoreTag);
// Now bind the result of the comparison.
- for (ExplodedNodeSet<GRState>::iterator I2 = TmpStore.begin(),
+ for (ExplodedNodeSet::iterator I2 = TmpStore.begin(),
E2 = TmpStore.end(); I2 != E2; ++I2) {
- ExplodedNode<GRState> *predNew = *I2;
+ ExplodedNode *predNew = *I2;
const GRState *stateNew = predNew->getState();
SVal Res = Engine.getValueManager().makeTruthVal(true, CE->getType());
Engine.MakeNode(Dst, CE, predNew, stateNew->bindExpr(CE, Res));
@@ -1402,11 +1402,11 @@ static bool EvalOSAtomicCompareAndSwap(ExplodedNodeSet<GRState>& Dst,
return true;
}
-static bool EvalOSAtomic(ExplodedNodeSet<GRState>& Dst,
+static bool EvalOSAtomic(ExplodedNodeSet& Dst,
GRExprEngine& Engine,
GRStmtNodeBuilder<GRState>& Builder,
CallExpr* CE, SVal L,
- ExplodedNode<GRState>* Pred) {
+ ExplodedNode* Pred) {
const FunctionDecl* FD = L.getAsFunctionDecl();
if (!FD)
return false;