SymbolReaper::isLive(SymbolRef) now always returns true for SymbolRegionRvalues because these represent the symbolic values for parameters/globals upon entry to the function. These values are always ;live' because they represent constraints on the context of how the function was called. This will be useful for both summary generation but is also necessary to get RegionStore's lazy-binding of locations to symbols to work in practice with RemoveDeadBindings.

llvm-svn: 62771
This commit is contained in:
Ted Kremenek 2009-01-22 18:51:33 +00:00
parent dec7fe2e71
commit 2dd9c9cbd7
1 changed files with 6 additions and 1 deletions

View File

@ -92,6 +92,11 @@ bool SymbolReaper::maybeDead(SymbolRef sym) {
}
bool SymbolReaper::isLive(SymbolRef sym) {
return TheLiving.contains(sym);
if (TheLiving.contains(sym))
return true;
// Interogate the symbol. It may derive from an input value to
// the analyzed function/method.
return isa<SymbolRegionRValue>(SymMgr.getSymbolData(sym));
}