Start to add a new transfer function that inlines callee. To be continued.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81501 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp
index 67328da..034ff93 100644
--- a/lib/Frontend/AnalysisConsumer.cpp
+++ b/lib/Frontend/AnalysisConsumer.cpp
@@ -412,6 +412,28 @@
   CheckObjCInstMethSignature(cast<ObjCImplementationDecl>(D), BR);
 }
 
+static void ActionInlineCall(AnalysisManager &mgr, Decl *D) {
+  if (!D)
+    return;
+
+  llvm::OwningPtr<GRTransferFuncs> TF(CreateCallInliner(mgr.getASTContext()));
+
+  // Construct the analysis engine.
+  GRExprEngine Eng(mgr);
+
+  Eng.setTransferFunctions(TF.get());
+  
+  Eng.RegisterInternalChecks();
+  RegisterAppleChecks(Eng, *D);
+
+  // Execute the worklist algorithm.
+  Eng.ExecuteWorkList(mgr.getStackFrame(D));
+  
+  // Visualize the exploded graph.
+  if (mgr.shouldVisualizeGraphviz())
+    Eng.ViewGraph(mgr.shouldTrimGraph());
+}
+
 //===----------------------------------------------------------------------===//
 // AnalysisConsumer creation.
 //===----------------------------------------------------------------------===//