Added recording of "implicit" NULL dereferences of symbolic pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46843 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/RValues.cpp b/Analysis/RValues.cpp
index f006ed7..d0f60fb 100644
--- a/Analysis/RValues.cpp
+++ b/Analysis/RValues.cpp
@@ -24,23 +24,35 @@
 //===----------------------------------------------------------------------===//
 
 SymbolID SymbolManager::getSymbol(ParmVarDecl* D) {
-  SymbolID& X = DataToSymbol[D];
+  SymbolID& X = DataToSymbol[getKey(D)];
   
   if (!X.isInitialized()) {
     X = SymbolToData.size();
-    SymbolToData.push_back(D);
+    SymbolToData.push_back(SymbolDataParmVar(D));
   }
   
   return X;
 }
 
+SymbolID SymbolManager::getContentsOfSymbol(SymbolID sym) {
+  SymbolID& X = DataToSymbol[getKey(sym)];
+  
+  if (!X.isInitialized()) {
+    X = SymbolToData.size();
+    SymbolToData.push_back(SymbolDataContentsOf(sym));
+  }
+  
+  return X;  
+}
+
 QualType SymbolData::getType() const {
   switch (getKind()) {
     default:
       assert (false && "getType() not implemented for this symbol.");
     
     case ParmKind:
-      return static_cast<ParmVarDecl*>(getPtr())->getType();
+      return cast<SymbolDataParmVar>(this)->getDecl()->getType();
+
   }
 }
 
@@ -554,7 +566,7 @@
   }
 }
 
-#if 0
+
 void LValue::print(std::ostream& Out) const {
   switch (getSubKind()) {        
     case lval::ConcreteIntKind:
@@ -576,4 +588,4 @@
       break;
   }
 }
-#endif
+