aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/SymbolManager.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-22 18:51:33 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-22 18:51:33 +0000
commitdcb6a26586bb05237f1f32f80de7b7f2bdab8ac3 (patch)
tree3f36d21064db324182bfe2b262172d7b60b4f2ea /lib/Analysis/SymbolManager.cpp
parent9ab6b9cfb76ee56a61829e2bdb08e5cdc288726e (diff)
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/SymbolManager.cpp')
-rw-r--r--lib/Analysis/SymbolManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Analysis/SymbolManager.cpp b/lib/Analysis/SymbolManager.cpp
index 54ba7b1d93..1672af8c61 100644
--- a/lib/Analysis/SymbolManager.cpp
+++ b/lib/Analysis/SymbolManager.cpp
@@ -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));
}