]> granicus.if.org Git - clang/commitdiff
remove TranslationUnit.
authorChris Lattner <sabre@nondot.org>
Sat, 28 Mar 2009 04:31:31 +0000 (04:31 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 28 Mar 2009 04:31:31 +0000 (04:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67914 91177308-0d34-0410-b5e6-96231b3b80d8

clang.xcodeproj/project.pbxproj
include/clang/AST/TranslationUnit.h [deleted file]
lib/AST/TranslationUnit.cpp [deleted file]
tools/clang-cc/AnalysisConsumer.cpp
tools/clang-cc/SerializationTest.cpp
tools/clang-cc/clang.cpp

index 4c8ab17ba6eee1059d63cc8503997a9ea06a2368..9c5e527a3dfb608bcf3bf94ff9e8ba24a3c0a469 100644 (file)
@@ -69,7 +69,6 @@
                35A3E7020DD3874400757F74 /* CGDebugInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A3E7000DD3874400757F74 /* CGDebugInfo.cpp */; };
                35A8FCF90D9B4B2A001C2F97 /* PathDiagnostic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */; };
                35BAC1E80E82C5B7003FB76F /* CheckNSError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */; };
-               35BB2D7D0D19951A00944DB5 /* TranslationUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35BB2D7C0D19951A00944DB5 /* TranslationUnit.cpp */; };
                35BB2D7F0D19954000944DB5 /* ASTConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35BB2D7E0D19954000944DB5 /* ASTConsumer.cpp */; };
                35CFFE000CA1CBCB00E6F2BE /* StmtViz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35CFFDFF0CA1CBCB00E6F2BE /* StmtViz.cpp */; };
                35D55B270D81D8C60092E734 /* BasicValueFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */; };
                35A8FCF80D9B4B29001C2F97 /* PathDiagnostic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathDiagnostic.cpp; path = lib/Analysis/PathDiagnostic.cpp; sourceTree = "<group>"; };
                35B820740ECB811A0020BEC0 /* PreprocessorLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreprocessorLexer.h; sourceTree = "<group>"; };
                35BAC1E70E82C5B7003FB76F /* CheckNSError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckNSError.cpp; path = lib/Analysis/CheckNSError.cpp; sourceTree = "<group>"; };
-               35BB2D7A0D1994FA00944DB5 /* TranslationUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = TranslationUnit.h; path = clang/AST/TranslationUnit.h; sourceTree = "<group>"; tabWidth = 2; };
-               35BB2D7C0D19951A00944DB5 /* TranslationUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationUnit.cpp; path = lib/AST/TranslationUnit.cpp; sourceTree = "<group>"; tabWidth = 2; };
                35BB2D7E0D19954000944DB5 /* ASTConsumer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; name = ASTConsumer.cpp; path = lib/AST/ASTConsumer.cpp; sourceTree = "<group>"; tabWidth = 2; };
                35BFBD2B0C9EDE1E006CB644 /* ASTConsumer.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ASTConsumer.h; path = clang/AST/ASTConsumer.h; sourceTree = "<group>"; tabWidth = 2; };
                35CEA05A0DF9E82700A41296 /* ExprObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; name = ExprObjC.h; path = clang/AST/ExprObjC.h; sourceTree = "<group>"; tabWidth = 2; };
                                35847BE30CC7DB9000C40FFF /* StmtIterator.h */,
                                35CFFE010CA1CBDD00E6F2BE /* StmtGraphTraits.h */,
                                1A68BC120D0CADDD001A28C8 /* TargetBuiltins.h */,
-                               35BB2D7A0D1994FA00944DB5 /* TranslationUnit.h */,
                                DE3464210B03040900DBC861 /* Type.h */,
                        );
                        name = AST;
                                35847BE40CC7DBAF00C40FFF /* StmtIterator.cpp */,
                                35839B090CDF845F006ED061 /* StmtSerialization.cpp */,
                                35CFFDFF0CA1CBCB00E6F2BE /* StmtViz.cpp */,
-                               35BB2D7C0D19951A00944DB5 /* TranslationUnit.cpp */,
                                DE75EDF00B06880E0020CF81 /* Type.cpp */,
                                35839B0A0CDF845F006ED061 /* TypeSerialization.cpp */,
                        );
                                3580CC0C0D072E5C00C5E4F4 /* LangOptions.cpp in Sources */,
                                DE704B260D0FBEBE009C7762 /* SemaDeclObjC.cpp in Sources */,
                                DE704DD20D1668A4009C7762 /* HeaderMap.cpp in Sources */,
-                               35BB2D7D0D19951A00944DB5 /* TranslationUnit.cpp in Sources */,
                                35BB2D7F0D19954000944DB5 /* ASTConsumer.cpp in Sources */,
                                DE47999C0D2EBE1A00706D2D /* SemaExprObjC.cpp in Sources */,
                                03F50AC60D416EAA00B9CF60 /* Targets.cpp in Sources */,
diff --git a/include/clang/AST/TranslationUnit.h b/include/clang/AST/TranslationUnit.h
deleted file mode 100644 (file)
index bd282cf..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//===--- TranslationUnit.h - Abstraction for Translation Units  -----------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-// FIXME: This should eventually be moved out of the driver, or replaced
-//        with its eventual successor.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_TRANSLATION_UNIT_H
-#define LLVM_CLANG_TRANSLATION_UNIT_H
-
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/Decl.h"
-#include "llvm/Bitcode/SerializationFwd.h"
-#include "llvm/System/Path.h"
-#include <string>
-
-namespace clang {
-class FileManager;
-class SourceManager;
-class TargetInfo;
-class IdentifierTable;
-class SelectorTable;
-class ASTContext;
-class Decl;
-class FileEntry;
-  
-class TranslationUnit {
-  ASTContext* Context;
-
-  // The default ctor is only invoked during deserialization.
-  explicit TranslationUnit() : Context(NULL) {}
-  
-public:
-  explicit TranslationUnit(ASTContext& Ctx)
-    : Context(&Ctx){}
-
-  ~TranslationUnit();
-
-  const std::string& getSourceFile() const;
-  /// Create - Reconsititute a translation unit from a bitcode stream.
-  //static TranslationUnit* Create(llvm::Deserializer& D, FileManager& FMgr);
-  
-  // Accessors
-  const LangOptions& getLangOptions() const { return Context->getLangOptions();}
-
-  ASTContext&        getContext() { return *Context; }
-  const ASTContext&  getContext() const { return *Context; }
-
-  typedef DeclContext::decl_iterator iterator;
-  iterator begin() const { 
-    return Context->getTranslationUnitDecl()->decls_begin(); 
-  }
-  iterator end() const { return Context->getTranslationUnitDecl()->decls_end(); }
-};
-  
-} // end namespace clang
-
-#endif
diff --git a/lib/AST/TranslationUnit.cpp b/lib/AST/TranslationUnit.cpp
deleted file mode 100644 (file)
index 0c69432..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//===--- TranslationUnit.cpp - Abstraction for Translation Units ----------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-// FIXME: This should eventually be moved out of the driver, or replaced
-//        with its eventual successor.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/AST/TranslationUnit.h"
-
-#include "clang/Basic/TargetInfo.h"
-#include "clang/Basic/SourceManager.h"
-#include "clang/AST/AST.h"
-
-#include "llvm/Bitcode/Serialize.h"
-#include "llvm/Bitcode/Deserialize.h"
-#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/System/Path.h"
-
-#include "llvm/ADT/OwningPtr.h"
-#include "llvm/ADT/DenseSet.h"
-
-using namespace clang;
-
-
-TranslationUnit::~TranslationUnit() {
-}
index 03e7ecc8af4dc910aaef763cedca79da9a1ccba7..366f3844f537f24cf936f7ebbe64367e8ff1839c 100644 (file)
@@ -25,7 +25,6 @@
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/AST/ParentMap.h"
-#include "clang/AST/TranslationUnit.h"
 #include "clang/Analysis/PathSensitive/BugReporter.h"
 #include "clang/Analysis/Analyses/LiveVariables.h"
 #include "clang/Analysis/LocalCheckers.h"
@@ -36,7 +35,6 @@
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/System/Path.h"
 #include "llvm/System/Program.h"
-#include <vector>
 
 using namespace clang;
 
index a39811fd90edcd70b249cc614089945e0e65e552..74ccb4b4d1f8d973d9a296d954578eb70342a5ab 100644 (file)
 //===----------------------------------------------------------------------===//
 
 #include "clang/AST/ASTConsumer.h"
+#include "clang/AST/ASTContext.h"
 #include "clang/AST/CFG.h"
 #include "clang/AST/Decl.h"
 #include "clang.h"
 #include "ASTConsumers.h"
-#include "clang/AST/TranslationUnit.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/Support/Streams.h"
+#include "llvm/System/Path.h"
 #include <fstream>
 #include <cstring>
 using namespace clang;
index 31a395876621e4dd98b021398025efc893955175..c0a2ae726b44b71df06cad0229efc7dc4bdc31e3 100644 (file)
 #include "clang/Frontend/TextDiagnosticBuffer.h"
 #include "clang/Frontend/TextDiagnosticPrinter.h"
 #include "clang/Analysis/PathDiagnostic.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/TranslationUnit.h"
 #include "clang/CodeGen/ModuleBuilder.h"
 #include "clang/Sema/ParseAST.h"
 #include "clang/Sema/SemaDiagnostic.h"
 #include "clang/AST/ASTConsumer.h"
+#include "clang/AST/ASTContext.h"
+#include "clang/AST/Decl.h"
 #include "clang/Parse/Parser.h"
 #include "clang/Lex/HeaderSearch.h"
 #include "clang/Lex/LexDiagnostic.h"