diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Frontend/ASTUnit.h | 43 | ||||
-rw-r--r-- | include/clang/Lex/PreprocessingRecord.h | 4 | ||||
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 3 | ||||
-rw-r--r-- | include/clang/Serialization/ASTSerializationListener.h | 44 | ||||
-rw-r--r-- | include/clang/Serialization/ASTWriter.h | 12 |
5 files changed, 0 insertions, 106 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h index 4a8475bb6c..37ae4e2932 100644 --- a/include/clang/Frontend/ASTUnit.h +++ b/include/clang/Frontend/ASTUnit.h @@ -68,10 +68,6 @@ class GlobalCodeCompletionAllocator /// \brief Utility class for loading a ASTContext from an AST file. /// class ASTUnit : public ModuleLoader { -public: - typedef std::map<FileID, std::vector<PreprocessedEntity *> > - PreprocessedEntitiesByFileMap; - private: llvm::IntrusiveRefCntPtr<Diagnostic> Diagnostics; llvm::IntrusiveRefCntPtr<FileManager> FileMgr; @@ -130,14 +126,6 @@ private: // source. In the long term we should make the Index library use efficient and // more scalable search mechanisms. std::vector<Decl*> TopLevelDecls; - - /// \brief The list of preprocessed entities which appeared when the ASTUnit - /// was loaded. - /// - /// FIXME: This is just an optimization hack to avoid deserializing large - /// parts of a PCH file while performing a walk or search. In the long term, - /// we should provide more scalable search mechanisms. - std::vector<PreprocessedEntity *> PreprocessedEntities; /// The name of the original source file used to generate this ASTUnit. std::string OriginalSourceFile; @@ -162,15 +150,6 @@ private: /// \brief Temporary files that should be removed when the ASTUnit is /// destroyed. SmallVector<llvm::sys::Path, 4> TemporaryFiles; - - /// \brief A mapping from file IDs to the set of preprocessed entities - /// stored in that file. - /// - /// FIXME: This is just an optimization hack to avoid searching through - /// many preprocessed entities during cursor traversal in the CIndex library. - /// Ideally, we would just be able to perform a binary search within the - /// list of preprocessed entities. - PreprocessedEntitiesByFileMap PreprocessedEntitiesByFile; /// \brief Simple hack to allow us to assert that ASTUnit is not being /// used concurrently, which is not supported. @@ -270,10 +249,6 @@ private: /// \brief A list of the serialization ID numbers for each of the top-level /// declarations parsed within the precompiled preamble. std::vector<serialization::DeclID> TopLevelDeclsInPreamble; - - /// \brief A list of the offsets into the precompiled preamble which - /// correspond to preprocessed entities. - std::vector<uint64_t> PreprocessedEntitiesInPreamble; /// \brief Whether we should be caching code-completion results. bool ShouldCacheCodeCompletionResults; @@ -418,7 +393,6 @@ private: bool AllowRebuild = true, unsigned MaxLines = 0); void RealizeTopLevelDeclsFromPreamble(); - void RealizePreprocessedEntitiesFromPreamble(); public: class ConcurrencyCheck { @@ -530,23 +504,6 @@ public: /// /// Note: This is used internally by the top-level tracking action unsigned &getCurrentTopLevelHashValue() { return CurrentTopLevelHashValue; } - - typedef std::vector<PreprocessedEntity *>::iterator pp_entity_iterator; - - pp_entity_iterator pp_entity_begin(); - pp_entity_iterator pp_entity_end(); - - /// \brief Add a new preprocessed entity that's stored at the given offset - /// in the precompiled preamble. - void addPreprocessedEntityFromPreamble(uint64_t Offset) { - PreprocessedEntitiesInPreamble.push_back(Offset); - } - - /// \brief Retrieve the mapping from File IDs to the preprocessed entities - /// within that file. - PreprocessedEntitiesByFileMap &getPreprocessedEntitiesByFile() { - return PreprocessedEntitiesByFile; - } /// \brief Get the source location for the given file:line:col triplet. /// diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h index 00b93c0158..bf1bb5301b 100644 --- a/include/clang/Lex/PreprocessingRecord.h +++ b/include/clang/Lex/PreprocessingRecord.h @@ -275,10 +275,6 @@ namespace clang { /// preprocessed entities that \arg Range encompasses. virtual std::pair<unsigned, unsigned> findPreprocessedEntitiesInRange(SourceRange Range) = 0; - - /// \brief Read the preprocessed entity at the given offset. - virtual PreprocessedEntity * - ReadPreprocessedEntityAtOffset(uint64_t Offset) = 0; }; /// \brief A record of the steps taken while preprocessing a source file, diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 96b5e5835c..48f8053471 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -801,9 +801,6 @@ public: virtual std::pair<unsigned, unsigned> findPreprocessedEntitiesInRange(SourceRange Range); - /// \brief Read the preprocessed entity at the given offset. - virtual PreprocessedEntity *ReadPreprocessedEntityAtOffset(uint64_t Offset); - /// \brief Read the header file information for the given file entry. virtual HeaderFileInfo GetHeaderFileInfo(const FileEntry *FE); diff --git a/include/clang/Serialization/ASTSerializationListener.h b/include/clang/Serialization/ASTSerializationListener.h deleted file mode 100644 index 0c62e0b9ca..0000000000 --- a/include/clang/Serialization/ASTSerializationListener.h +++ /dev/null @@ -1,44 +0,0 @@ -//===- ASTSerializationListener.h - Decl/Type PCH Write Events -*- 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 ASTSerializationListener class, which is notified -// by the ASTWriter when an entity is serialized. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_FRONTEND_AST_SERIALIZATION_LISTENER_H -#define LLVM_CLANG_FRONTEND_AST_SERIALIZATION_LISTENER_H - -#include "llvm/Support/DataTypes.h" - -namespace clang { - -class PreprocessedEntity; - -/// \brief Listener object that receives callbacks when certain kinds of -/// entities are serialized. -class ASTSerializationListener { -public: - virtual ~ASTSerializationListener(); - - /// \brief Callback invoked whenever a preprocessed entity is serialized. - /// - /// This callback will only occur when the translation unit was created with - /// a detailed preprocessing record. - /// - /// \param Entity The entity that has been serialized. - /// - /// \param Offset The offset (in bits) of this entity in the resulting - /// AST file. - virtual void SerializedPreprocessedEntity(PreprocessedEntity *Entity, - uint64_t Offset) = 0; -}; - -} - -#endif diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h index 13220f470e..b8ac8fa183 100644 --- a/include/clang/Serialization/ASTWriter.h +++ b/include/clang/Serialization/ASTWriter.h @@ -38,7 +38,6 @@ namespace llvm { namespace clang { class ASTContext; -class ASTSerializationListener; class NestedNameSpecifier; class CXXBaseSpecifier; class CXXCtorInitializer; @@ -93,10 +92,6 @@ private: /// \brief The reader of existing AST files, if we're chaining. ASTReader *Chain; - - /// \brief A listener object that receives notifications when certain - /// entities are serialized. - ASTSerializationListener *SerializationListener; /// \brief Indicates when the AST writing is actively performing /// serialization, rather than just queueing updates. @@ -393,12 +388,6 @@ public: /// \brief Create a new precompiled header writer that outputs to /// the given bitstream. ASTWriter(llvm::BitstreamWriter &Stream); - - /// \brief Set the listener that will receive notification of serialization - /// events. - void SetSerializationListener(ASTSerializationListener *Listener) { - SerializationListener = Listener; - } /// \brief Write a precompiled header for the given semantic analysis. /// @@ -665,7 +654,6 @@ public: virtual void InitializeSema(Sema &S) { SemaPtr = &S; } virtual void HandleTranslationUnit(ASTContext &Ctx); virtual ASTMutationListener *GetASTMutationListener(); - virtual ASTSerializationListener *GetASTSerializationListener(); virtual ASTDeserializationListener *GetASTDeserializationListener(); }; |