diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-04-09 06:32:20 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-04-09 06:32:20 +0000 |
commit | 6782f75fd0028f28292620c09c3b912be749762d (patch) | |
tree | 35577709f322baa44940dfeb57fb7da2e28e53a4 /lib/Analysis/CFRefCount.cpp | |
parent | fe1635bb27f5a13314169143cfdae6ecc6e4b3e2 (diff) |
clean up code with new API.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 5d1834f929..1f7f5fb4d0 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -1789,28 +1789,12 @@ void CFRefCount::EvalSummary(ExplodedNodeSet<GRState>& Dst, if (Loc::IsLocType(FT) || (FT->isIntegerType() && FT->isScalarType())) { - // Tag the symbol with the field decl so that we generate - // a unique symbol. - SymbolRef NewSym = - Eng.getSymbolManager().getConjuredSymbol(*I, FT, Count, FD); - - // Create a region. - // FIXME: How do we handle 'typedefs' in TypeViewRegions? - // e.g.: - // typedef struct *s foo; - // - // ((foo) x)->f vs. x->f - // - // The cast will add a ViewTypeRegion. Probably RegionStore - // needs to reason about typedefs explicitly when binding - // fields and elements. - // const FieldRegion* FR = MRMgr.getFieldRegion(FD, R); - - state = state.BindLoc(Loc::MakeVal(FR), - Loc::IsLocType(FT) - ? cast<SVal>(loc::SymbolVal(NewSym)) - : cast<SVal>(nonloc::SymbolVal(NewSym))); + + SVal V = SVal::GetConjuredSymbolVal(Eng.getSymbolManager(), + Eng.getStoreManager().getRegionManager(), *I, FT, Count); + + state = state.BindLoc(Loc::MakeVal(FR), V); } } } |