Refactored all logic to run the GRSimpleVals and CFRef checker into a common
code path in the clang driver.

Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49500 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index efd4821..85c8e86 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -874,22 +874,7 @@
 }
 
 //===----------------------------------------------------------------------===//
-// Driver for the CFRefCount Checker.
+// Transfer function creation for external clients.
 //===----------------------------------------------------------------------===//
 
-namespace clang {
-  
-void CheckCFRefCount(CFG& cfg, Decl& CD, ASTContext& Ctx,
-                     Diagnostic& Diag, PathDiagnosticClient* PD) {
-  
-  if (Diag.hasErrorOccurred())
-    return;
-  
-  GRExprEngine Eng(cfg, CD, Ctx);
-  CFRefCount TF;
-  Eng.setTransferFunctions(TF);
-  Eng.ExecuteWorkList();
-  Eng.EmitWarnings(Diag, PD);
-}
-
-} // end clang namespace
+GRTransferFuncs* clang::MakeCFRefCountTF() { return new CFRefCount(); }