forked from OSchip/llvm-project
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:
parent
e76c0b13b9
commit
375387d1f8
|
@ -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?");
|
||||
|
|
Loading…
Reference in New Issue