diff options
Diffstat (limited to 'include/clang/Basic/Module.h')
-rw-r--r-- | include/clang/Basic/Module.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/clang/Basic/Module.h b/include/clang/Basic/Module.h index 1bc8925..1702fb1 100644 --- a/include/clang/Basic/Module.h +++ b/include/clang/Basic/Module.h @@ -15,6 +15,7 @@ #ifndef LLVM_CLANG_BASIC_MODULE_H #define LLVM_CLANG_BASIC_MODULE_H +#include "clang/Basic/FileManager.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseSet.h" @@ -35,9 +36,6 @@ namespace llvm { namespace clang { -class DirectoryEntry; -class FileEntry; -class FileManager; class LangOptions; class TargetInfo; class IdentifierInfo; @@ -152,6 +150,9 @@ public: /// \brief Whether this module is missing a feature from \c Requirements. unsigned IsMissingRequirement : 1; + /// \brief Whether we tried and failed to load a module file for this module. + unsigned HasIncompatibleModuleFile : 1; + /// \brief Whether this module is available in the current translation unit. /// /// If the module is missing headers or does not meet all requirements then @@ -356,6 +357,12 @@ public: /// its top-level module. std::string getFullModuleName() const; + /// \brief Whether the full name of this module is equal to joining + /// \p nameParts with "."s. + /// + /// This is more efficient than getFullModuleName(). + bool fullModuleNameIs(ArrayRef<StringRef> nameParts) const; + /// \brief Retrieve the top-level module for this (sub)module, which may /// be this module. Module *getTopLevelModule() { @@ -469,6 +476,13 @@ public: submodule_iterator submodule_end() { return SubModules.end(); } submodule_const_iterator submodule_end() const { return SubModules.end(); } + llvm::iterator_range<submodule_iterator> submodules() { + return llvm::make_range(submodule_begin(), submodule_end()); + } + llvm::iterator_range<submodule_const_iterator> submodules() const { + return llvm::make_range(submodule_begin(), submodule_end()); + } + /// \brief Appends this module's list of exported modules to \p Exported. /// /// This provides a subset of immediately imported modules (the ones that are |