diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-01-22 18:51:33 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-01-22 18:51:33 +0000 |
commit | 2dd9c9cbd7917ffaa1c0658c8d3d53dc9d0833e1 (patch) | |
tree | b879e33d864028102a7432e4e05bc5df9dca0255 /clang/lib/Analysis/SymbolManager.cpp | |
parent | dec7fe2e71df234f56f4e5fd59ef376a2568bc0e (diff) | |
download | bcm5719-llvm-2dd9c9cbd7917ffaa1c0658c8d3d53dc9d0833e1.tar.gz bcm5719-llvm-2dd9c9cbd7917ffaa1c0658c8d3d53dc9d0833e1.zip |
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
Diffstat (limited to 'clang/lib/Analysis/SymbolManager.cpp')
-rw-r--r-- | clang/lib/Analysis/SymbolManager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Analysis/SymbolManager.cpp b/clang/lib/Analysis/SymbolManager.cpp index 54ba7b1d937..1672af8c611 100644 --- a/clang/lib/Analysis/SymbolManager.cpp +++ b/clang/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)); } |