diff options
Diffstat (limited to 'include/clang/Lex')
-rw-r--r-- | include/clang/Lex/HeaderSearch.h | 5 | ||||
-rw-r--r-- | include/clang/Lex/ModuleMap.h | 20 |
2 files changed, 20 insertions, 5 deletions
diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h index ade5d2a6f1..10242fa264 100644 --- a/include/clang/Lex/HeaderSearch.h +++ b/include/clang/Lex/HeaderSearch.h @@ -185,7 +185,8 @@ class HeaderSearch { explicit HeaderSearch(const HeaderSearch&); void operator=(const HeaderSearch&); public: - HeaderSearch(FileManager &FM, DiagnosticsEngine &Diags); + HeaderSearch(FileManager &FM, DiagnosticsEngine &Diags, + const LangOptions &LangOpts); ~HeaderSearch(); FileManager &getFileMgr() const { return FileMgr; } @@ -369,6 +370,8 @@ public: bool hasModuleMap(StringRef Filename, const DirectoryEntry *Root); /// \brief Retrieve the module that corresponds to the given file, if any. + /// + /// \param File The header that we wish to map to a module. Module *findModuleForHeader(const FileEntry *File); diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index 2d95255290..b017a05e97 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -38,8 +38,13 @@ class ModuleMapParser; class ModuleMap { SourceManager *SourceMgr; llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags; - LangOptions LangOpts; - + const LangOptions &LangOpts; + + /// \brief Language options used to parse the module map itself. + /// + /// These are always simple C language options. + LangOptions MMapLangOpts; + /// \brief The top-level modules that are known. llvm::StringMap<Module *> Modules; @@ -82,7 +87,10 @@ public: /// /// \param DC A diagnostic consumer that will be cloned for use in generating /// diagnostics. - ModuleMap(FileManager &FileMgr, const DiagnosticConsumer &DC); + /// + /// \param LangOpts Language options for this translation unit. + ModuleMap(FileManager &FileMgr, const DiagnosticConsumer &DC, + const LangOptions &LangOpts); /// \brief Destroy the module map. /// @@ -96,6 +104,10 @@ public: /// that no module owns this header file. Module *findModuleForHeader(const FileEntry *File); + /// \brief Determine whether the given header is part of a module + /// marked 'unavailable'. + bool isHeaderInUnavailableModule(const FileEntry *Header); + /// \brief Retrieve a module with the given name. /// /// \param The name of the module to look up. @@ -188,7 +200,7 @@ public: /// \brief Adds this header to the given module. void addHeader(Module *Mod, const FileEntry *Header); - + /// \brief Parse the given module map file, and record any modules we /// encounter. /// |