Implemented initial transfer function support for '&&', '||', '?', and
__builtin_choose.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46731 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/ValueState.cpp b/Analysis/ValueState.cpp
index de286ae..f323fd4 100644
--- a/Analysis/ValueState.cpp
+++ b/Analysis/ValueState.cpp
@@ -16,7 +16,7 @@
   return InvalidValue();
 }
 
-RValue ValueStateManager::GetValue(const StateTy& St, Stmt* S) {
+RValue ValueStateManager::GetValue(const StateTy& St, Stmt* S, bool* hasVal) {
   for (;;) {
     switch (S->getStmtClass()) {
         
@@ -73,7 +73,14 @@
   
   StateTy::TreeTy* T = St.SlimFind(S);
   
-  return T ? T->getValue().second : InvalidValue();
+  if (T) {
+    if (hasVal) *hasVal = true;
+    return T->getValue().second;
+  }
+  else {
+    if (hasVal) *hasVal = false;
+    return InvalidValue();
+  }
 }
 
 LValue ValueStateManager::GetLValue(const StateTy& St, Stmt* S) {