diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-02-05 06:57:29 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-02-05 06:57:29 +0000 |
commit | 026c66395b88a09437319139a43b090093f7e1dd (patch) | |
tree | 7955f6fdf8c03de8d27a80ed0adf8d2e898e3e84 /lib/Analysis/BasicConstraintManager.cpp | |
parent | cf70177a9cf6c35b27e73cf58f82dd4d6b0fa354 (diff) |
Make SymbolicRegion subclass TypedRegion, for symbols usually have types, so
do the symblic regions associated with them and we need them to be typed.
Current SymbolicRegion::getRValueType() method is very restricting. It may be
modified when we are more clear about what could be the types of symblic
regions.
BasicConstraintManager::Assume() is changed due to that now SymblicRegion is a
subclass of SubRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicConstraintManager.cpp')
-rw-r--r-- | lib/Analysis/BasicConstraintManager.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Analysis/BasicConstraintManager.cpp b/lib/Analysis/BasicConstraintManager.cpp index 0c98bf6450..58c4727d51 100644 --- a/lib/Analysis/BasicConstraintManager.cpp +++ b/lib/Analysis/BasicConstraintManager.cpp @@ -165,17 +165,14 @@ const GRState* BasicConstraintManager::AssumeAux(const GRState* St, Loc Cond, // FIXME: Should this go into the storemanager? const MemRegion* R = cast<loc::MemRegionVal>(Cond).getRegion(); - - while (R) { - if (const SubRegion* SubR = dyn_cast<SubRegion>(R)) { - R = SubR->getSuperRegion(); - continue; - } - else if (const SymbolicRegion* SymR = dyn_cast<SymbolicRegion>(R)) + const SubRegion* SubR = dyn_cast<SubRegion>(R); + + while (SubR) { + // FIXME: now we only find the first symbolic region. + if (const SymbolicRegion* SymR = dyn_cast<SymbolicRegion>(SubR)) return AssumeAux(St, loc::SymbolVal(SymR->getSymbol()), Assumption, isFeasible); - - break; + SubR = dyn_cast<SubRegion>(SubR->getSuperRegion()); } // FALL-THROUGH. |