Consolidate logic in ActionInlineCall by having it call ActionGRExprEngine instead of replicating most of its logic (and missing pieces).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89886 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp
index ad980fe..4449de7 100644
--- a/lib/Frontend/AnalysisConsumer.cpp
+++ b/lib/Frontend/AnalysisConsumer.cpp
@@ -312,7 +312,8 @@
}
-static void ActionGRExprEngine(AnalysisConsumer &C, AnalysisManager& mgr, Decl *D,
+static void ActionGRExprEngine(AnalysisConsumer &C, AnalysisManager& mgr,
+ Decl *D,
GRTransferFuncs* tf) {
llvm::OwningPtr<GRTransferFuncs> TF(tf);
@@ -453,25 +454,8 @@
static void ActionInlineCall(AnalysisConsumer &C, AnalysisManager &mgr,
Decl *D) {
- if (!D)
- return;
-
- C.DisplayFunction(D);
- llvm::OwningPtr<GRTransferFuncs> TF(CreateCallInliner(mgr.getASTContext()));
-
- // Construct the analysis engine.
- GRExprEngine Eng(mgr);
-
- Eng.setTransferFunctions(TF.get());
- RegisterAppleChecks(Eng, *D);
-
- // Execute the worklist algorithm.
- Eng.ExecuteWorkList(mgr.getStackFrame(D));
-
- // Visualize the exploded graph.
- if (mgr.shouldVisualizeGraphviz())
- Eng.ViewGraph(mgr.shouldTrimGraph());
+ ActionGRExprEngine(C, mgr, D, CreateCallInliner(mgr.getASTContext()));
}
//===----------------------------------------------------------------------===//