diff options
Diffstat (limited to 'Analysis/GRConstants.cpp')
-rw-r--r-- | Analysis/GRConstants.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Analysis/GRConstants.cpp b/Analysis/GRConstants.cpp index 35758c672e..9db8e7f196 100644 --- a/Analysis/GRConstants.cpp +++ b/Analysis/GRConstants.cpp @@ -608,8 +608,7 @@ public: /// mappings removed. StateTy RemoveDeadBindings(Stmt* S, StateTy M); - StateTy SetValue(StateTy St, Stmt* S, const ExprValue& V, - bool isBlkExpr = false); + StateTy SetValue(StateTy St, Stmt* S, const ExprValue& V); StateTy SetValue(StateTy St, const LValue& LV, const ExprValue& V); @@ -726,13 +725,15 @@ LValue GRConstants::GetLValue(const StateTy& St, Stmt* S) { } GRConstants::StateTy GRConstants::SetValue(StateTy St, Stmt* S, - const ExprValue& V, bool isBlkExpr) { + const ExprValue& V) { if (!StateCleaned) { St = RemoveDeadBindings(CurrentStmt, St); StateCleaned = true; } + bool isBlkExpr = S == CurrentStmt && getCFG().isBlkExpr(S); + return V.isValid() ? StateMgr.Add(St, ValueKey(S,isBlkExpr), V) : St; } |