diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-30 21:56:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-30 21:56:17 +0000 |
commit | 782582df7b06952e96123b3cde509ef4f5c794a3 (patch) | |
tree | d26eca42295b671e01ab3daf60796ea79d1f0e57 /lib/Analysis/RegionStore.cpp | |
parent | d497bae0ed149584636f07b638ba8db6e3f0fcb3 (diff) |
Revert 68028.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 0b2d99b29b..60948062f6 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -362,13 +362,9 @@ SVal RegionStoreManager::getLValueFieldOrIvar(const GRState* St, SVal Base, BaseR = cast<loc::MemRegionVal>(BaseL).getRegion(); break; - case loc::SymbolValKind: { - SymbolRef Sym = cast<loc::SymbolVal>(&BaseL)->getSymbol(); - const SymbolicRegion* SR = MRMgr.getSymbolicRegion(Sym); - // Layer the type information. - BaseR = MRMgr.getTypedViewRegion(Sym->getType(getContext()), SR); + case loc::SymbolValKind: + BaseR = MRMgr.getSymbolicRegion(cast<loc::SymbolVal>(&BaseL)->getSymbol()); break; - } case loc::GotoLabelKind: case loc::FuncValKind: @@ -411,14 +407,9 @@ SVal RegionStoreManager::getLValueElement(const GRState* St, const TypedRegion* BaseRegion = 0; - if (isa<loc::SymbolVal>(Base)) { - SymbolRef Sym = cast<loc::SymbolVal>(Base).getSymbol(); - SymbolicRegion* SR = MRMgr.getSymbolicRegion(Sym); - // Layer the type information. - BaseRegion = MRMgr.getTypedViewRegion(Sym->getType(getContext()), SR); - } - else - BaseRegion = cast<TypedRegion>(cast<loc::MemRegionVal>(Base).getRegion()); + BaseRegion = isa<loc::SymbolVal>(Base) + ? MRMgr.getSymbolicRegion(cast<loc::SymbolVal>(Base).getSymbol()) + : cast<TypedRegion>(cast<loc::MemRegionVal>(Base).getRegion()); // Pointer of any type can be cast and used as array base. const ElementRegion *ElemR = dyn_cast<ElementRegion>(BaseRegion); |