[cfe-commits] r67914 - in /cfe/trunk: clang.xcodeproj/project.pbxproj include/clang/AST/TranslationUnit.h lib/AST/TranslationUnit.cpp tools/clang-cc/AnalysisConsumer.cpp tools/clang-cc/SerializationTest.cpp tools/clang-cc/clang.cpp
Chris Lattner
sabre at nondot.org
Fri Mar 27 21:31:31 PDT 2009
Author: lattner
Date: Fri Mar 27 23:31:31 2009
New Revision: 67914
URL: http://llvm.org/viewvc/llvm-project?rev=67914&view=rev
Log:
remove TranslationUnit.
Removed:
cfe/trunk/include/clang/AST/TranslationUnit.h
cfe/trunk/lib/AST/TranslationUnit.cpp
Modified:
cfe/trunk/clang.xcodeproj/project.pbxproj
cfe/trunk/tools/clang-cc/AnalysisConsumer.cpp
cfe/trunk/tools/clang-cc/SerializationTest.cpp
cfe/trunk/tools/clang-cc/clang.cpp
Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=67914&r1=67913&r2=67914&view=diff
==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Fri Mar 27 23:31:31 2009
@@ -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 */; };
@@ -417,8 +416,6 @@
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; };
@@ -1073,7 +1070,6 @@
35847BE30CC7DB9000C40FFF /* StmtIterator.h */,
35CFFE010CA1CBDD00E6F2BE /* StmtGraphTraits.h */,
1A68BC120D0CADDD001A28C8 /* TargetBuiltins.h */,
- 35BB2D7A0D1994FA00944DB5 /* TranslationUnit.h */,
DE3464210B03040900DBC861 /* Type.h */,
);
name = AST;
@@ -1107,7 +1103,6 @@
35847BE40CC7DBAF00C40FFF /* StmtIterator.cpp */,
35839B090CDF845F006ED061 /* StmtSerialization.cpp */,
35CFFDFF0CA1CBCB00E6F2BE /* StmtViz.cpp */,
- 35BB2D7C0D19951A00944DB5 /* TranslationUnit.cpp */,
DE75EDF00B06880E0020CF81 /* Type.cpp */,
35839B0A0CDF845F006ED061 /* TypeSerialization.cpp */,
);
@@ -1443,7 +1438,6 @@
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 */,
Removed: cfe/trunk/include/clang/AST/TranslationUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TranslationUnit.h?rev=67913&view=auto
==============================================================================
--- cfe/trunk/include/clang/AST/TranslationUnit.h (original)
+++ cfe/trunk/include/clang/AST/TranslationUnit.h (removed)
@@ -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
Removed: cfe/trunk/lib/AST/TranslationUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TranslationUnit.cpp?rev=67913&view=auto
==============================================================================
--- cfe/trunk/lib/AST/TranslationUnit.cpp (original)
+++ cfe/trunk/lib/AST/TranslationUnit.cpp (removed)
@@ -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() {
-}
Modified: cfe/trunk/tools/clang-cc/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/AnalysisConsumer.cpp?rev=67914&r1=67913&r2=67914&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/AnalysisConsumer.cpp (original)
+++ cfe/trunk/tools/clang-cc/AnalysisConsumer.cpp Fri Mar 27 23:31:31 2009
@@ -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;
Modified: cfe/trunk/tools/clang-cc/SerializationTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/SerializationTest.cpp?rev=67914&r1=67913&r2=67914&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/SerializationTest.cpp (original)
+++ cfe/trunk/tools/clang-cc/SerializationTest.cpp Fri Mar 27 23:31:31 2009
@@ -15,14 +15,15 @@
//===----------------------------------------------------------------------===//
#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;
Modified: cfe/trunk/tools/clang-cc/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang.cpp?rev=67914&r1=67913&r2=67914&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/clang.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang.cpp Fri Mar 27 23:31:31 2009
@@ -31,12 +31,12 @@
#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"
More information about the cfe-commits
mailing list