Instead of r74522, use another approach to fix xfail_regionstore_wine_crash.c.
Mark the super region of the binding of block level expr in the Environment as live. llvm-svn: 74525
This commit is contained in:
parent
e205d43c75
commit
703db197e3
|
@ -143,8 +143,17 @@ EnvironmentManager::RemoveDeadBindings(Environment Env, Stmt* Loc,
|
||||||
SVal X = I.getData();
|
SVal X = I.getData();
|
||||||
|
|
||||||
// If the block expr's value is a memory region, then mark that region.
|
// If the block expr's value is a memory region, then mark that region.
|
||||||
if (isa<loc::MemRegionVal>(X))
|
if (isa<loc::MemRegionVal>(X)) {
|
||||||
DRoots.push_back(cast<loc::MemRegionVal>(X).getRegion());
|
const MemRegion* R = cast<loc::MemRegionVal>(X).getRegion();
|
||||||
|
DRoots.push_back(R);
|
||||||
|
// Mark the super region of the RX as live.
|
||||||
|
// e.g.: int x; char *y = (char*) &x; if (*y) ...
|
||||||
|
// 'y' => element region. 'x' is its super region.
|
||||||
|
// We only add one level super region for now.
|
||||||
|
if (const SubRegion *SR = dyn_cast<SubRegion>(R)) {
|
||||||
|
DRoots.push_back(SR->getSuperRegion());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Mark all symbols in the block expr's value live.
|
// Mark all symbols in the block expr's value live.
|
||||||
MarkLiveCallback cb(SymReaper);
|
MarkLiveCallback cb(SymReaper);
|
||||||
|
|
|
@ -138,7 +138,6 @@ void TransferFuncs::Visit(Stmt *S) {
|
||||||
else {
|
else {
|
||||||
// For block-level expressions, mark that they are live.
|
// For block-level expressions, mark that they are live.
|
||||||
LiveState(S,AD) = Alive;
|
LiveState(S,AD) = Alive;
|
||||||
StmtVisitor<TransferFuncs,void>::Visit(S);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue