Use canonical type for building ElementRegion. Otherwise ElementRegions cannot
be unique.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73482 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/Store.cpp b/lib/Analysis/Store.cpp
index 13326ab..5aa756e 100644
--- a/lib/Analysis/Store.cpp
+++ b/lib/Analysis/Store.cpp
@@ -90,7 +90,8 @@
         // FIXME: Is this the right thing to do in all cases?
         const TypedRegion *Base = isa<ElementRegion>(TR) ?
                                   cast<TypedRegion>(TR->getSuperRegion()) : TR;
-        ElementRegion* ER = MRMgr.getElementRegion(Pointee, Idx, Base);
+        ElementRegion* ER = MRMgr.getElementRegion(Pointee, Idx, Base, 
+						   StateMgr.getContext());
         return CastResult(state, ER);
       }
     }