Implemented "getType()" for symbolic values representing the "contents" of
another symbolic value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47339 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Analysis/SymbolManager.cpp b/Analysis/SymbolManager.cpp
index bdda0e6..ced5741 100644
--- a/Analysis/SymbolManager.cpp
+++ b/Analysis/SymbolManager.cpp
@@ -38,7 +38,7 @@
   return X;  
 }
 
-QualType SymbolData::getType() const {
+QualType SymbolData::getType(const SymbolManager& SymMgr) const {
   switch (getKind()) {
     default:
       assert (false && "getType() not implemented for this symbol.");
@@ -46,6 +46,11 @@
     case ParmKind:
       return cast<SymbolDataParmVar>(this)->getDecl()->getType();
       
+    case ContentsOfKind: {
+      SymbolID x = cast<SymbolDataContentsOf>(this)->getSymbol();
+      QualType T = SymMgr.getSymbolData(x).getType(SymMgr);
+      return T->getAsPointerType()->getPointeeType();
+    }
   }
 }