From c86b984ea8ecb3e944dc3de48539f4c1f65851ea Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 18 Jan 2015 16:23:48 +0000 Subject: Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102 --- include/clang/Serialization/ModuleManager.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'include/clang/Serialization/ModuleManager.h') diff --git a/include/clang/Serialization/ModuleManager.h b/include/clang/Serialization/ModuleManager.h index 3259902..3d10fad 100644 --- a/include/clang/Serialization/ModuleManager.h +++ b/include/clang/Serialization/ModuleManager.h @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_SERIALIZATION_MODULE_MANAGER_H -#define LLVM_CLANG_SERIALIZATION_MODULE_MANAGER_H +#ifndef LLVM_CLANG_SERIALIZATION_MODULEMANAGER_H +#define LLVM_CLANG_SERIALIZATION_MODULEMANAGER_H #include "clang/Basic/FileManager.h" #include "clang/Serialization/Module.h" @@ -41,7 +41,8 @@ class ModuleManager { FileManager &FileMgr; /// \brief A lookup of in-memory (virtual file) buffers - llvm::DenseMap InMemoryBuffers; + llvm::DenseMap> + InMemoryBuffers; /// \brief The visitation order. SmallVector VisitOrder; @@ -141,7 +142,7 @@ public: ModuleFile *lookup(const FileEntry *File); /// \brief Returns the in-memory (virtual file) buffer with the given name - llvm::MemoryBuffer *lookupBuffer(StringRef Name); + std::unique_ptr lookupBuffer(StringRef Name); /// \brief Number of modules loaded unsigned size() const { return Chain.size(); } @@ -178,6 +179,12 @@ public: /// \param ExpectedModTime The expected modification time of the module /// file, used for validation. This will be zero if unknown. /// + /// \param ExpectedSignature The expected signature of the module file, used + /// for validation. This will be zero if unknown. + /// + /// \param ReadSignature Reads the signature from an AST file without actually + /// loading it. + /// /// \param Module A pointer to the module file if the module was successfully /// loaded. /// @@ -190,6 +197,9 @@ public: SourceLocation ImportLoc, ModuleFile *ImportedBy, unsigned Generation, off_t ExpectedSize, time_t ExpectedModTime, + ASTFileSignature ExpectedSignature, + std::function + ReadSignature, ModuleFile *&Module, std::string &ErrorStr); @@ -199,7 +209,8 @@ public: ModuleMap *modMap); /// \brief Add an in-memory buffer the list of known buffers - void addInMemoryBuffer(StringRef FileName, llvm::MemoryBuffer *Buffer); + void addInMemoryBuffer(StringRef FileName, + std::unique_ptr Buffer); /// \brief Set the global module index. void setGlobalIndex(GlobalModuleIndex *Index); @@ -232,7 +243,7 @@ public: /// Any module that is known to both the global module index and the module /// manager that is *not* in this set can be skipped. void visit(bool (*Visitor)(ModuleFile &M, void *UserData), void *UserData, - llvm::SmallPtrSet *ModuleFilesHit = nullptr); + llvm::SmallPtrSetImpl *ModuleFilesHit = nullptr); /// \brief Visit each of the modules with a depth-first traversal. /// -- cgit v1.1