diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-01-30 06:01:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-01-30 06:01:29 +0000 |
commit | dc58aa71026cce539ca9b5c2c52cc4efc7bd77fe (patch) | |
tree | 6ced169a86aa0072e25c83227aa56b7dc75199e1 /include/clang/Lex | |
parent | add5adb9aa5facc1cd170fc9dacbd58cde028025 (diff) |
Thread a TargetInfo through to the module map; we'll need it for
target-specific module requirements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex')
-rw-r--r-- | include/clang/Lex/HeaderSearch.h | 6 | ||||
-rw-r--r-- | include/clang/Lex/ModuleMap.h | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h index c5969489f5..84bb37da3a 100644 --- a/include/clang/Lex/HeaderSearch.h +++ b/include/clang/Lex/HeaderSearch.h @@ -189,7 +189,7 @@ class HeaderSearch { public: HeaderSearch(FileManager &FM, DiagnosticsEngine &Diags, - const LangOptions &LangOpts); + const LangOptions &LangOpts, const TargetInfo *Target); ~HeaderSearch(); FileManager &getFileMgr() const { return FileMgr; } @@ -243,6 +243,10 @@ public: ExternalSource = ES; } + /// \brief Set the target information for the header search, if not + /// already known. + void setTarget(const TargetInfo &Target); + /// LookupFile - Given a "foo" or <foo> reference, look up the indicated file, /// return null on failure. /// diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index 3e794f5c00..6176ed8c30 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -39,7 +39,8 @@ class ModuleMap { SourceManager *SourceMgr; llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags; const LangOptions &LangOpts; - + const TargetInfo *Target; + /// \brief Language options used to parse the module map itself. /// /// These are always simple C language options. @@ -89,13 +90,18 @@ public: /// diagnostics. /// /// \param LangOpts Language options for this translation unit. + /// + /// \param Target The target for this translation unit. ModuleMap(FileManager &FileMgr, const DiagnosticConsumer &DC, - const LangOptions &LangOpts); + const LangOptions &LangOpts, const TargetInfo *Target); /// \brief Destroy the module map. /// ~ModuleMap(); - + + /// \brief Set the target information. + void setTarget(const TargetInfo &Target); + /// \brief Retrieve the module that owns the given header file, if any. /// /// \param File The header file that is likely to be included. |