Change RegionStoreManager::Retrieve to infer the type of a symbolic region from the context when it is not already available.

llvm-svn: 106868
This commit is contained in:
Tom Care 2010-06-25 18:22:31 +00:00
parent e76c0b13b9
commit 375387d1f8
1 changed files with 6 additions and 1 deletions

View File

@ -1022,8 +1022,13 @@ SVal RegionStoreManager::Retrieve(Store store, Loc L, QualType T) {
const MemRegion *MR = cast<loc::MemRegionVal>(L).getRegion();
if (isa<AllocaRegion>(MR) || isa<SymbolicRegion>(MR))
if (isa<AllocaRegion>(MR) || isa<SymbolicRegion>(MR)) {
if (T.isNull()) {
const SymbolicRegion *SR = cast<SymbolicRegion>(MR);
T = SR->getSymbol()->getType(getContext());
}
MR = GetElementZeroRegion(MR, T);
}
if (isa<CodeTextRegion>(MR)) {
assert(0 && "Why load from a code text region?");