Go to the documentation of this file.
15 #ifndef LLVM_CLANG_SERIALIZATION_GLOBALMODULEINDEX_H
16 #define LLVM_CLANG_SERIALIZATION_GLOBALMODULEINDEX_H
18 #include "llvm/ADT/DenseMap.h"
19 #include "llvm/ADT/SmallPtrSet.h"
20 #include "llvm/ADT/SmallVector.h"
21 #include "llvm/ADT/StringMap.h"
22 #include "llvm/ADT/StringRef.h"
23 #include "llvm/Support/Error.h"
28 class BitstreamCursor;
35 class IdentifierIterator;
36 class PCHContainerOperations;
37 class PCHContainerReader;
39 namespace serialization {
59 std::unique_ptr<llvm::MemoryBuffer> Buffer;
66 void *IdentifierIndex;
70 ModuleInfo() :
File(), Size(), ModTime() { }
99 llvm::DenseMap<ModuleFile *, unsigned> ModulesByFile;
105 llvm::StringMap<unsigned> UnresolvedModules;
108 unsigned NumIdentifierLookups;
112 unsigned NumIdentifierLookupHits;
116 llvm::BitstreamCursor
Cursor);
131 static std::pair<GlobalModuleIndex *, llvm::Error>
185 llvm::StringRef Path);
void getModuleDependencies(ModuleFile *File, llvm::SmallVectorImpl< ModuleFile * > &Dependencies)
Retrieve the set of module files on which the given module file directly depends.
A global index for a set of module files, providing information about the identifiers within those mo...
YAML serialization mapping.
static llvm::Error writeIndex(FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, llvm::StringRef Path)
Write a global index into the given.
void dump()
Print debugging view to standard error.
void printStats()
Print statistics to standard error.
llvm::SmallPtrSet< ModuleFile *, 4 > HitSet
A set of module files in which we found a result.
void getKnownModules(llvm::SmallVectorImpl< ModuleFile * > &ModuleFiles)
Retrieve the set of modules that have up-to-date indexes.
This abstract interface provides operations for unwrapping containers for serialized ASTs (precompile...
An iterator that walks over all of the known identifiers in the lookup table.
bool lookupIdentifier(llvm::StringRef Name, HitSet &Hits)
Look for all of the module files with information about the given identifier, e.g....
bool loadedModuleFile(ModuleFile *File)
Note that the given module file has been loaded.
Implements support for file system lookup, file system caching, and directory search management.
static std::pair< GlobalModuleIndex *, llvm::Error > readIndex(llvm::StringRef Path)
Read a global index file for the given directory.
Information about a module that has been loaded by the ASTReader.
IdentifierIterator * createIdentifierIterator() const
Returns an iterator for identifiers stored in the index table.