aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/SValuator.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-10-14 06:55:01 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-10-14 06:55:01 +0000
commit09270cc1b9cdd4c50012cb7984df8745e05833e5 (patch)
treef48c3bf50d9fca5f2cc959ad618726721ef970bc /lib/Analysis/SValuator.cpp
parent18e7a3d403d4271408aceb406d0e50110832f5d8 (diff)
Now StoreManager::CastRegion() takes a MemRegion, returns a MemRegion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/SValuator.cpp')
-rw-r--r--lib/Analysis/SValuator.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/Analysis/SValuator.cpp b/lib/Analysis/SValuator.cpp
index 86006c3df6..573cac315b 100644
--- a/lib/Analysis/SValuator.cpp
+++ b/lib/Analysis/SValuator.cpp
@@ -133,18 +133,15 @@ SValuator::CastResult SValuator::EvalCast(SVal val, const GRState *state,
StoreManager &storeMgr = ValMgr.getStateManager().getStoreManager();
- // Delegate to store manager to get the result of casting a region
- // to a different type.
- const StoreManager::CastResult& Res = storeMgr.CastRegion(state, R, castTy);
-
- // Inspect the result. If the MemRegion* returned is NULL, this
- // expression evaluates to UnknownVal.
- R = Res.getRegion();
+ // Delegate to store manager to get the result of casting a region to a
+ // different type. If the MemRegion* returned is NULL, this expression
+ // evaluates to UnknownVal.
+ R = storeMgr.CastRegion(R, castTy);
if (R)
- return CastResult(Res.getState(), loc::MemRegionVal(R));
+ return CastResult(state, loc::MemRegionVal(R));
- return CastResult(Res.getState(), UnknownVal());
+ return CastResult(state, UnknownVal());
}
// All other cases.