As Ted suggested, record the callsite information with the StackFrameContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92121 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/AnalysisContext.cpp b/lib/Analysis/AnalysisContext.cpp
index 05e5196..97e6d91 100644
--- a/lib/Analysis/AnalysisContext.cpp
+++ b/lib/Analysis/AnalysisContext.cpp
@@ -105,7 +105,7 @@
 }
 
 void StackFrameContext::Profile(llvm::FoldingSetNodeID &ID) {
-  Profile(ID, getAnalysisContext(), getParent(), CallSite);
+  Profile(ID, getAnalysisContext(), getParent(), CallSite, Block, Index);
 }
 
 void ScopeContext::Profile(llvm::FoldingSetNodeID &ID) {
@@ -145,8 +145,18 @@
 const StackFrameContext*
 LocationContextManager::getStackFrame(AnalysisContext *ctx,
                                       const LocationContext *parent,
-                                      const Stmt *s) {
-  return getLocationContext<StackFrameContext, Stmt>(ctx, parent, s);
+                                      const Stmt *s, const CFGBlock *blk,
+                                      unsigned idx) {
+  llvm::FoldingSetNodeID ID;
+  StackFrameContext::Profile(ID, ctx, parent, s, blk, idx);
+  void *InsertPos;
+  StackFrameContext *L = 
+   cast_or_null<StackFrameContext>(Contexts.FindNodeOrInsertPos(ID, InsertPos));
+  if (!L) {
+    L = new StackFrameContext(ctx, parent, s, blk, idx);
+    Contexts.InsertNode(L, InsertPos);
+  }
+  return L;
 }
 
 const ScopeContext *