forked from OSchip/llvm-project
Update old CastRegion logic to not assume that ElementRegion's super region is a
TypedRegion. While we plan on removing this code at some point, it serves as a good reference implementation for use with BasicStore until we are sure the new CastRegion logic (in RegionStore.cpp) is correct. llvm-svn: 74559
This commit is contained in:
parent
58d8190417
commit
aff66a8a19
|
@ -88,10 +88,10 @@ StoreManager::CastRegion(const GRState* state, const MemRegion* R,
|
||||||
|
|
||||||
// If the super region is an element region, strip it away.
|
// If the super region is an element region, strip it away.
|
||||||
// FIXME: Is this the right thing to do in all cases?
|
// FIXME: Is this the right thing to do in all cases?
|
||||||
const TypedRegion *Base = isa<ElementRegion>(TR) ?
|
const MemRegion *Base = isa<ElementRegion>(TR) ? TR->getSuperRegion()
|
||||||
cast<TypedRegion>(TR->getSuperRegion()) : TR;
|
: TR;
|
||||||
ElementRegion* ER = MRMgr.getElementRegion(Pointee, Idx, Base,
|
ElementRegion* ER = MRMgr.getElementRegion(Pointee, Idx, Base,
|
||||||
StateMgr.getContext());
|
StateMgr.getContext());
|
||||||
return CastResult(state, ER);
|
return CastResult(state, ER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue