summaryrefslogtreecommitdiffstats
path: root/include/clang/Serialization/ModuleManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Serialization/ModuleManager.h')
-rw-r--r--include/clang/Serialization/ModuleManager.h92
1 files changed, 46 insertions, 46 deletions
diff --git a/include/clang/Serialization/ModuleManager.h b/include/clang/Serialization/ModuleManager.h
index 147a6910aa..e101e60b21 100644
--- a/include/clang/Serialization/ModuleManager.h
+++ b/include/clang/Serialization/ModuleManager.h
@@ -45,45 +45,45 @@ class PCHContainerReader;
namespace serialization {
-/// \brief Manages the set of modules loaded by an AST reader.
+/// Manages the set of modules loaded by an AST reader.
class ModuleManager {
- /// \brief The chain of AST files, in the order in which we started to load
+ /// The chain of AST files, in the order in which we started to load
/// them (this order isn't really useful for anything).
SmallVector<std::unique_ptr<ModuleFile>, 2> Chain;
- /// \brief The chain of non-module PCH files. The first entry is the one named
+ /// The chain of non-module PCH files. The first entry is the one named
/// by the user, the last one is the one that doesn't depend on anything
/// further.
SmallVector<ModuleFile *, 2> PCHChain;
- // \brief The roots of the dependency DAG of AST files. This is used
+ // The roots of the dependency DAG of AST files. This is used
// to implement short-circuiting logic when running DFS over the dependencies.
SmallVector<ModuleFile *, 2> Roots;
- /// \brief All loaded modules, indexed by name.
+ /// All loaded modules, indexed by name.
llvm::DenseMap<const FileEntry *, ModuleFile *> Modules;
- /// \brief FileManager that handles translating between filenames and
+ /// FileManager that handles translating between filenames and
/// FileEntry *.
FileManager &FileMgr;
/// Cache of PCM files.
IntrusiveRefCntPtr<MemoryBufferCache> PCMCache;
- /// \brief Knows how to unwrap module containers.
+ /// Knows how to unwrap module containers.
const PCHContainerReader &PCHContainerRdr;
- /// \brief Preprocessor's HeaderSearchInfo containing the module map.
+ /// Preprocessor's HeaderSearchInfo containing the module map.
const HeaderSearch &HeaderSearchInfo;
- /// \brief A lookup of in-memory (virtual file) buffers
+ /// A lookup of in-memory (virtual file) buffers
llvm::DenseMap<const FileEntry *, std::unique_ptr<llvm::MemoryBuffer>>
InMemoryBuffers;
- /// \brief The visitation order.
+ /// The visitation order.
SmallVector<ModuleFile *, 4> VisitOrder;
- /// \brief The list of module files that both we and the global module index
+ /// The list of module files that both we and the global module index
/// know about.
///
/// Either the global index or the module manager may have modules that the
@@ -93,13 +93,13 @@ class ModuleManager {
/// known to the global index.
SmallVector<ModuleFile *, 4> ModulesInCommonWithGlobalIndex;
- /// \brief The global module index, if one is attached.
+ /// The global module index, if one is attached.
///
/// The global module index will actually be owned by the ASTReader; this is
/// just an non-owning pointer.
GlobalModuleIndex *GlobalIndex = nullptr;
- /// \brief State used by the "visit" operation to avoid malloc traffic in
+ /// State used by the "visit" operation to avoid malloc traffic in
/// calls to visit().
struct VisitState {
explicit VisitState(unsigned N) : VisitNumber(N, 0) {
@@ -110,22 +110,22 @@ class ModuleManager {
delete NextState;
}
- /// \brief The stack used when marking the imports of a particular module
+ /// The stack used when marking the imports of a particular module
/// as not-to-be-visited.
SmallVector<ModuleFile *, 4> Stack;
- /// \brief The visit number of each module file, which indicates when
+ /// The visit number of each module file, which indicates when
/// this module file was last visited.
SmallVector<unsigned, 4> VisitNumber;
- /// \brief The next visit number to use to mark visited module files.
+ /// The next visit number to use to mark visited module files.
unsigned NextVisitNumber = 1;
- /// \brief The next visit state.
+ /// The next visit state.
VisitState *NextState = nullptr;
};
- /// \brief The first visit() state in the chain.
+ /// The first visit() state in the chain.
VisitState *FirstVisitState = nullptr;
VisitState *allocateVisitState();
@@ -145,74 +145,74 @@ public:
const HeaderSearch &HeaderSearchInfo);
~ModuleManager();
- /// \brief Forward iterator to traverse all loaded modules.
+ /// Forward iterator to traverse all loaded modules.
ModuleIterator begin() { return Chain.begin(); }
- /// \brief Forward iterator end-point to traverse all loaded modules
+ /// Forward iterator end-point to traverse all loaded modules
ModuleIterator end() { return Chain.end(); }
- /// \brief Const forward iterator to traverse all loaded modules.
+ /// Const forward iterator to traverse all loaded modules.
ModuleConstIterator begin() const { return Chain.begin(); }
- /// \brief Const forward iterator end-point to traverse all loaded modules
+ /// Const forward iterator end-point to traverse all loaded modules
ModuleConstIterator end() const { return Chain.end(); }
- /// \brief Reverse iterator to traverse all loaded modules.
+ /// Reverse iterator to traverse all loaded modules.
ModuleReverseIterator rbegin() { return Chain.rbegin(); }
- /// \brief Reverse iterator end-point to traverse all loaded modules.
+ /// Reverse iterator end-point to traverse all loaded modules.
ModuleReverseIterator rend() { return Chain.rend(); }
- /// \brief A range covering the PCH and preamble module files loaded.
+ /// A range covering the PCH and preamble module files loaded.
llvm::iterator_range<SmallVectorImpl<ModuleFile *>::const_iterator>
pch_modules() const {
return llvm::make_range(PCHChain.begin(), PCHChain.end());
}
- /// \brief Returns the primary module associated with the manager, that is,
+ /// Returns the primary module associated with the manager, that is,
/// the first module loaded
ModuleFile &getPrimaryModule() { return *Chain[0]; }
- /// \brief Returns the primary module associated with the manager, that is,
+ /// Returns the primary module associated with the manager, that is,
/// the first module loaded.
ModuleFile &getPrimaryModule() const { return *Chain[0]; }
- /// \brief Returns the module associated with the given index
+ /// Returns the module associated with the given index
ModuleFile &operator[](unsigned Index) const { return *Chain[Index]; }
- /// \brief Returns the module associated with the given file name.
+ /// Returns the module associated with the given file name.
ModuleFile *lookupByFileName(StringRef FileName) const;
- /// \brief Returns the module associated with the given module name.
+ /// Returns the module associated with the given module name.
ModuleFile *lookupByModuleName(StringRef ModName) const;
- /// \brief Returns the module associated with the given module file.
+ /// Returns the module associated with the given module file.
ModuleFile *lookup(const FileEntry *File) const;
- /// \brief Returns the in-memory (virtual file) buffer with the given name
+ /// Returns the in-memory (virtual file) buffer with the given name
std::unique_ptr<llvm::MemoryBuffer> lookupBuffer(StringRef Name);
- /// \brief Number of modules loaded
+ /// Number of modules loaded
unsigned size() const { return Chain.size(); }
- /// \brief The result of attempting to add a new module.
+ /// The result of attempting to add a new module.
enum AddModuleResult {
- /// \brief The module file had already been loaded.
+ /// The module file had already been loaded.
AlreadyLoaded,
- /// \brief The module file was just loaded in response to this call.
+ /// The module file was just loaded in response to this call.
NewlyLoaded,
- /// \brief The module file is missing.
+ /// The module file is missing.
Missing,
- /// \brief The module file is out-of-date.
+ /// The module file is out-of-date.
OutOfDate
};
using ASTFileSignatureReader = ASTFileSignature (*)(StringRef);
- /// \brief Attempts to create a new module and add it to the list of known
+ /// Attempts to create a new module and add it to the list of known
/// modules.
///
/// \param FileName The file name of the module to be loaded.
@@ -255,23 +255,23 @@ public:
ModuleFile *&Module,
std::string &ErrorStr);
- /// \brief Remove the modules starting from First (to the end).
+ /// Remove the modules starting from First (to the end).
void removeModules(ModuleIterator First,
llvm::SmallPtrSetImpl<ModuleFile *> &LoadedSuccessfully,
ModuleMap *modMap);
- /// \brief Add an in-memory buffer the list of known buffers
+ /// Add an in-memory buffer the list of known buffers
void addInMemoryBuffer(StringRef FileName,
std::unique_ptr<llvm::MemoryBuffer> Buffer);
- /// \brief Set the global module index.
+ /// Set the global module index.
void setGlobalIndex(GlobalModuleIndex *Index);
- /// \brief Notification from the AST reader that the given module file
+ /// Notification from the AST reader that the given module file
/// has been "accepted", and will not (can not) be unloaded.
void moduleFileAccepted(ModuleFile *MF);
- /// \brief Visit each of the modules.
+ /// Visit each of the modules.
///
/// This routine visits each of the modules, starting with the
/// "root" modules that no other loaded modules depend on, and
@@ -293,7 +293,7 @@ public:
void visit(llvm::function_ref<bool(ModuleFile &M)> Visitor,
llvm::SmallPtrSetImpl<ModuleFile *> *ModuleFilesHit = nullptr);
- /// \brief Attempt to resolve the given module file name to a file entry.
+ /// Attempt to resolve the given module file name to a file entry.
///
/// \param FileName The name of the module file.
///
@@ -315,7 +315,7 @@ public:
time_t ExpectedModTime,
const FileEntry *&File);
- /// \brief View the graphviz representation of the module graph.
+ /// View the graphviz representation of the module graph.
void viewGraph();
MemoryBufferCache &getPCMCache() const { return *PCMCache; }