Added several guards in transfer functions for "InvalidValues".

Fixed bug in RemoveDeadBindings by implementing a simple "mark-and-sweep"
cleaner over the bindings, starting from the Decls and block-level expressions
that are considered "live" by the Liveness analysis.

Fixed bug in isa<> implementation for class LValue.

Added "VisitDeclRefExpr" to GRConstants so that we explicitly bind the current
value of variable to the Block-level Expression (i.e., when the DeclRefExpr is
at the CFGBlock level).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46839 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/ValueState.cpp b/Analysis/ValueState.cpp
index 1b08d8e..b5a5985 100644
--- a/Analysis/ValueState.cpp
+++ b/Analysis/ValueState.cpp
@@ -34,6 +34,9 @@
 
 
 RValue ValueStateManager::GetValue(const StateTy& St, const LValue& LV) {
+  if (isa<InvalidValue>(LV))
+    return InvalidValue();
+  
   switch (LV.getSubKind()) {
     case lval::DeclValKind: {
       StateTy::VariableBindingsTy::TreeTy* T =