Since now we store the cast type with an ElementRegion, there is
no need to store a type with SymbolRegionValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97437 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/SymbolManager.cpp b/lib/Checker/SymbolManager.cpp
index 7278b41..f2d630c 100644
--- a/lib/Checker/SymbolManager.cpp
+++ b/lib/Checker/SymbolManager.cpp
@@ -79,14 +79,14 @@
 }
 
 const SymbolRegionValue*
-SymbolManager::getRegionValueSymbol(const MemRegion* R, QualType T) {
+SymbolManager::getRegionValueSymbol(const TypedRegion* R) {
   llvm::FoldingSetNodeID profile;
-  SymbolRegionValue::Profile(profile, R, T);
+  SymbolRegionValue::Profile(profile, R);
   void* InsertPos;
   SymExpr *SD = DataSet.FindNodeOrInsertPos(profile, InsertPos);
   if (!SD) {
     SD = (SymExpr*) BPAlloc.Allocate<SymbolRegionValue>();
-    new (SD) SymbolRegionValue(SymbolCounter, R, T);
+    new (SD) SymbolRegionValue(SymbolCounter, R);
     DataSet.InsertNode(SD, InsertPos);
     ++SymbolCounter;
   }
@@ -176,13 +176,7 @@
 }
 
 QualType SymbolRegionValue::getType(ASTContext& C) const {
-  if (!T.isNull())
-    return T;
-
-  if (const TypedRegion* TR = dyn_cast<TypedRegion>(R))
-    return TR->getValueType(C);
-
-  return QualType();
+  return R->getValueType(C);
 }
 
 SymbolManager::~SymbolManager() {}