[cfe-commits] r154672 - in /cfe/trunk: include/clang/Frontend/ASTUnit.h include/clang/Index/ include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h lib/Analysis/CMakeLists.txt lib/CMakeLists.txt lib/Index/ lib/Makefile lib/StaticAnalyzer/Core/AnalysisManager.cpp lib/StaticAnalyzer/Core/CoreEngine.cpp lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp

Douglas Gregor dgregor at apple.com
Fri Apr 13 09:31:47 PDT 2012


Author: dgregor
Date: Fri Apr 13 11:31:46 2012
New Revision: 154672

URL: http://llvm.org/viewvc/llvm-project?rev=154672&view=rev
Log:
Remove the unused, unmaintained, incomplete 'Index' library.

Removed:
    cfe/trunk/include/clang/Index/
    cfe/trunk/lib/Index/
Modified:
    cfe/trunk/include/clang/Frontend/ASTUnit.h
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
    cfe/trunk/lib/Analysis/CMakeLists.txt
    cfe/trunk/lib/CMakeLists.txt
    cfe/trunk/lib/Makefile
    cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp
    cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
    cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp

Modified: cfe/trunk/include/clang/Frontend/ASTUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/ASTUnit.h?rev=154672&r1=154671&r2=154672&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/ASTUnit.h (original)
+++ cfe/trunk/include/clang/Frontend/ASTUnit.h Fri Apr 13 11:31:46 2012
@@ -14,7 +14,6 @@
 #ifndef LLVM_CLANG_FRONTEND_ASTUNIT_H
 #define LLVM_CLANG_FRONTEND_ASTUNIT_H
 
-#include "clang/Index/ASTLocation.h"
 #include "clang/Serialization/ASTBitCodes.h"
 #include "clang/Sema/Sema.h"
 #include "clang/Sema/CodeCompleteConsumer.h"
@@ -57,8 +56,6 @@
 class TargetInfo;
 class ASTFrontendAction;
 
-using namespace idx;
-  
 /// \brief Utility class for loading a ASTContext from an AST file.
 ///
 class ASTUnit : public ModuleLoader {
@@ -134,9 +131,6 @@
   /// The name of the original source file used to generate this ASTUnit.
   std::string OriginalSourceFile;
 
-  // Critical optimization when using clang_getCursor().
-  ASTLocation LastLoc;
-
   /// \brief The set of diagnostics produced when creating the preamble.
   SmallVector<StoredDiagnostic, 4> PreambleDiagnostics;
 
@@ -474,10 +468,6 @@
   bool getOwnsRemappedFileBuffers() const { return OwnsRemappedFileBuffers; }
   void setOwnsRemappedFileBuffers(bool val) { OwnsRemappedFileBuffers = val; }
 
-  void setLastASTLocation(ASTLocation ALoc) { LastLoc = ALoc; }
-  ASTLocation getLastASTLocation() const { return LastLoc; }
-
-
   StringRef getMainFileName() const;
 
   typedef std::vector<Decl *>::iterator top_level_iterator;

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h?rev=154672&r1=154671&r2=154672&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h Fri Apr 13 11:31:46 2012
@@ -22,11 +22,6 @@
 
 namespace clang {
 
-namespace idx { 
-  class Indexer;
-  class TranslationUnit; 
-}
-
 namespace ento {
   class CheckerManager;
 
@@ -46,11 +41,6 @@
 
   CheckerManager *CheckerMgr;
 
-  /// \brief Provide function definitions in other translation units. This is
-  /// NULL if we don't have multiple translation units. AnalysisManager does
-  /// not own the Indexer.
-  idx::Indexer *Idxer;
-
   enum AnalysisScope { ScopeTU, ScopeDecl } AScope;
 
   /// \brief The maximum number of exploded nodes the analyzer will generate.
@@ -99,7 +89,6 @@
                   StoreManagerCreator storemgr,
                   ConstraintManagerCreator constraintmgr, 
                   CheckerManager *checkerMgr,
-                  idx::Indexer *idxer,
                   unsigned maxnodes, unsigned maxvisit,
                   bool vizdot, bool vizubi, AnalysisPurgeMode purge,
                   bool eager, bool trim,
@@ -137,8 +126,6 @@
 
   CheckerManager *getCheckerManager() const { return CheckerMgr; }
 
-  idx::Indexer *getIndexer() const { return Idxer; }
-
   virtual ASTContext &getASTContext() {
     return Ctx;
   }
@@ -186,10 +173,6 @@
 
   bool shouldInlineCall() const { return (IPAMode == Inlining); }
 
-  bool hasIndexer() const { return Idxer != 0; }
-
-  AnalysisDeclContext *getAnalysisDeclContextInAnotherTU(const Decl *D);
-
   CFG *getCFG(Decl const *D) {
     return AnaCtxMgr.getContext(D)->getCFG();
   }

Modified: cfe/trunk/lib/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CMakeLists.txt?rev=154672&r1=154671&r2=154672&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CMakeLists.txt (original)
+++ cfe/trunk/lib/Analysis/CMakeLists.txt Fri Apr 13 11:31:46 2012
@@ -1,4 +1,4 @@
-set(LLVM_USED_LIBS clangBasic clangAST clangIndex)
+set(LLVM_USED_LIBS clangBasic clangAST)
 
 add_clang_library(clangAnalysis
   AnalysisDeclContext.cpp

Modified: cfe/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CMakeLists.txt?rev=154672&r1=154671&r2=154672&view=diff
==============================================================================
--- cfe/trunk/lib/CMakeLists.txt (original)
+++ cfe/trunk/lib/CMakeLists.txt Fri Apr 13 11:31:46 2012
@@ -14,5 +14,4 @@
 add_subdirectory(Frontend)
 add_subdirectory(FrontendTool)
 add_subdirectory(Tooling)
-add_subdirectory(Index)
 add_subdirectory(StaticAnalyzer)

Modified: cfe/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Makefile?rev=154672&r1=154671&r2=154672&view=diff
==============================================================================
--- cfe/trunk/lib/Makefile (original)
+++ cfe/trunk/lib/Makefile Fri Apr 13 11:31:46 2012
@@ -10,7 +10,7 @@
 
 PARALLEL_DIRS = Headers Basic Lex Parse AST Sema CodeGen Analysis \
                 StaticAnalyzer Edit Rewrite ARCMigrate Serialization Frontend \
-                FrontendTool Tooling Index Driver
+                FrontendTool Tooling Driver
 
 include $(CLANG_LEVEL)/Makefile
 

Modified: cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp?rev=154672&r1=154671&r2=154672&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/AnalysisManager.cpp Fri Apr 13 11:31:46 2012
@@ -8,8 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
-#include "clang/Index/Entity.h"
-#include "clang/Index/Indexer.h"
 
 using namespace clang;
 using namespace ento;
@@ -22,7 +20,6 @@
                                  StoreManagerCreator storemgr,
                                  ConstraintManagerCreator constraintmgr, 
                                  CheckerManager *checkerMgr,
-                                 idx::Indexer *idxer,
                                  unsigned maxnodes, unsigned maxvisit,
                                  bool vizdot, bool vizubi,
                                  AnalysisPurgeMode purge,
@@ -38,7 +35,7 @@
   : AnaCtxMgr(useUnoptimizedCFG, addImplicitDtors, addInitializers),
     Ctx(ctx), Diags(diags), LangOpts(lang), PD(pd),
     CreateStoreMgr(storemgr), CreateConstraintMgr(constraintmgr),
-    CheckerMgr(checkerMgr), Idxer(idxer),
+    CheckerMgr(checkerMgr), 
     AScope(ScopeDecl), MaxNodes(maxnodes), MaxVisit(maxvisit),
     VisualizeEGDot(vizdot), VisualizeEGUbi(vizubi), PurgeDead(purge),
     EagerlyAssume(eager), TrimGraph(trim),
@@ -62,7 +59,6 @@
     CreateStoreMgr(ParentAM.CreateStoreMgr),
     CreateConstraintMgr(ParentAM.CreateConstraintMgr),
     CheckerMgr(ParentAM.CheckerMgr),
-    Idxer(ParentAM.Idxer),
     AScope(ScopeDecl),
     MaxNodes(ParentAM.MaxNodes),
     MaxVisit(ParentAM.MaxVisit),
@@ -80,21 +76,3 @@
 {
   AnaCtxMgr.getCFGBuildOptions().setAllAlwaysAdd();
 }
-
-
-AnalysisDeclContext *
-AnalysisManager::getAnalysisDeclContextInAnotherTU(const Decl *D) {
-  idx::Entity Ent = idx::Entity::get(const_cast<Decl *>(D), 
-                                     Idxer->getProgram());
-  FunctionDecl *FuncDef;
-  idx::TranslationUnit *TU;
-  llvm::tie(FuncDef, TU) = Idxer->getDefinitionFor(Ent);
-
-  if (FuncDef == 0)
-    return 0;
-
-  // This AnalysisDeclContext wraps function definition in another translation unit.
-  // But it is still owned by the AnalysisManager associated with the current
-  // translation unit.
-  return AnaCtxMgr.getContext(FuncDef, TU);
-}

Modified: cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp?rev=154672&r1=154671&r2=154672&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CoreEngine.cpp Fri Apr 13 11:31:46 2012
@@ -17,7 +17,6 @@
 #include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h"
 #include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
-#include "clang/Index/TranslationUnit.h"
 #include "clang/AST/Expr.h"
 #include "clang/AST/StmtCXX.h"
 #include "llvm/Support/Casting.h"

Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp?rev=154672&r1=154671&r2=154672&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp Fri Apr 13 11:31:46 2012
@@ -207,7 +207,6 @@
                                   PP.getLangOpts(), PD,
                                   CreateStoreMgr, CreateConstraintMgr,
                                   checkerMgr.get(),
-                                  /* Indexer */ 0, 
                                   Opts.MaxNodes, Opts.MaxLoop,
                                   Opts.VisualizeEGDot, Opts.VisualizeEGUbi,
                                   Opts.AnalysisPurgeOpt, Opts.EagerlyAssume,





More information about the cfe-commits mailing list