]> granicus.if.org Git - clang/commitdiff
Move the ManagerRegistry to the Analysis library to resolve the layering violation.
authorChandler Carruth <chandlerc@gmail.com>
Wed, 11 Nov 2009 19:10:59 +0000 (19:10 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 11 Nov 2009 19:10:59 +0000 (19:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86863 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Frontend/ManagerRegistry.h [deleted file]
lib/Analysis/CMakeLists.txt
lib/Analysis/RangeConstraintManager.cpp
lib/Frontend/AnalysisConsumer.cpp
lib/Frontend/CMakeLists.txt
lib/Frontend/ManagerRegistry.cpp [deleted file]

diff --git a/include/clang/Frontend/ManagerRegistry.h b/include/clang/Frontend/ManagerRegistry.h
deleted file mode 100644 (file)
index f05cfe6..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- ManagerRegistry.h - Pluggable analyzer module registry --*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the ManagerRegistry and Register* classes.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_FRONTEND_MANAGER_REGISTRY_H
-#define LLVM_CLANG_FRONTEND_MANAGER_REGISTRY_H
-
-#include "clang/Analysis/PathSensitive/GRState.h"
-
-namespace clang {
-
-/// ManagerRegistry - This class records manager creators registered at
-/// runtime. The information is communicated to AnalysisManager through static
-/// members. Better design is expected.
-
-class ManagerRegistry {
-public:
-  static StoreManagerCreator StoreMgrCreator;
-  static ConstraintManagerCreator ConstraintMgrCreator;
-};
-
-/// RegisterConstraintManager - This class is used to setup the constraint
-/// manager of the static analyzer. The constructor takes a creator function
-/// pointer for creating the constraint manager.
-///
-/// It is used like this:
-///
-/// class MyConstraintManager {};
-/// ConstraintManager* CreateMyConstraintManager(GRStateManager& statemgr) {
-///  return new MyConstraintManager(statemgr);
-/// }
-/// RegisterConstraintManager X(CreateMyConstraintManager);
-
-class RegisterConstraintManager {
-public:
-  RegisterConstraintManager(ConstraintManagerCreator CMC) {
-    assert(ManagerRegistry::ConstraintMgrCreator == 0
-           && "ConstraintMgrCreator already set!");
-    ManagerRegistry::ConstraintMgrCreator = CMC;
-  }
-};
-
-}
-#endif
index eb83ad56bf3e7e63ec1289b4e453a09b8c40ca67..e75c0ecfdda531b308b3ba3444450b20c2d9f5b4 100644 (file)
@@ -34,6 +34,7 @@ add_clang_library(clangAnalysis
   GRExprEngineInternalChecks.cpp
   GRState.cpp
   LiveVariables.cpp
+  ManagerRegistry.cpp
   MemRegion.cpp
   NSAutoreleasePoolChecker.cpp
   NSErrorChecker.cpp
index 73b445e6ab36b61776d23090839cb53c06064a6d..f5cae698f92431071f0b504f5c6865cc6f45090a 100644 (file)
@@ -16,7 +16,7 @@
 #include "clang/Analysis/PathSensitive/GRState.h"
 #include "clang/Analysis/PathSensitive/GRStateTrait.h"
 #include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
-#include "clang/Frontend/ManagerRegistry.h"
+#include "clang/Analysis/ManagerRegistry.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/ADT/FoldingSet.h"
index a3f7adbdf5d017e7b8c44c31cb2c5dc39e88c359..d51730c20f2e91c207353065dd82b8234cf231f1 100644 (file)
@@ -20,6 +20,7 @@
 #include "clang/Analysis/Analyses/LiveVariables.h"
 #include "clang/Analysis/CFG.h"
 #include "clang/Analysis/LocalCheckers.h"
+#include "clang/Analysis/ManagerRegistry.h"
 #include "clang/Analysis/PathDiagnostic.h"
 #include "clang/Analysis/PathSensitive/AnalysisManager.h"
 #include "clang/Analysis/PathSensitive/BugReporter.h"
@@ -27,7 +28,6 @@
 #include "clang/Analysis/PathSensitive/GRTransferFuncs.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceManager.h"
-#include "clang/Frontend/ManagerRegistry.h"
 #include "clang/Frontend/PathDiagnosticClients.h"
 #include "clang/Lex/Preprocessor.h"
 #include "llvm/Support/Compiler.h"
index e3ec78627da05f3640adffcd6d38d5422ee20028..007f1d12a35dc2ec211e21bddf6951cbdcbe4aae 100644 (file)
@@ -16,7 +16,6 @@ add_clang_library(clangFrontend
   HTMLPrint.cpp
   InitHeaderSearch.cpp
   InitPreprocessor.cpp
-  ManagerRegistry.cpp
   PCHReader.cpp
   PCHReaderDecl.cpp
   PCHReaderStmt.cpp
diff --git a/lib/Frontend/ManagerRegistry.cpp b/lib/Frontend/ManagerRegistry.cpp
deleted file mode 100644 (file)
index 79f1e81..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//===- ManagerRegistry.cpp - Pluggble Analyzer module creators --*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the pluggable analyzer module creators.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Frontend/ManagerRegistry.h"
-
-using namespace clang;
-
-StoreManagerCreator ManagerRegistry::StoreMgrCreator = 0;
-
-ConstraintManagerCreator ManagerRegistry::ConstraintMgrCreator = 0;