diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-16 23:02:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-16 23:02:25 +0000 |
commit | adb979924ade3e25342c38a5b564400b4e0540c1 (patch) | |
tree | 6a1a626999f8c57453479faa97e6d893ef1db2f5 /include/clang | |
parent | 960809e7e9f4a6e949797d20bc081da80495c0e1 (diff) |
A module with an umbrella header assumes that all of the headers in
the umbrella header's directory and its subdirectories are part of the
module (that's why it's an umbrella). Make sure that these headers are
considered to be part of the module for lookup purposes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/DiagnosticLexKinds.td | 4 | ||||
-rw-r--r-- | include/clang/Lex/ModuleMap.h | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index 48110fc5c5..5925ef8bd6 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -397,5 +397,7 @@ def err_mmap_umbrella_header_conflict : Error< "module '%0' already has an umbrella header ('%1')">; def err_mmap_umbrella_header_submodule : Error< "submodule '%0' can not have an umbrella header">; - +def err_mmap_umbrella_clash : Error< + "umbrella header for module '%0' already covers this directory">; + } diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index 6ca37f1005..74cca6b881 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -27,6 +27,7 @@ namespace clang { +class DirectoryEntry; class FileEntry; class FileManager; class DiagnosticConsumer; @@ -96,6 +97,14 @@ private: /// that header. llvm::DenseMap<const FileEntry *, Module *> Headers; + /// \brief Mapping from directories with umbrella headers to the module + /// that is generated from the umbrella header. + /// + /// This mapping is used to map headers that haven't explicitly been named + /// in the module map over to the module that includes them via its umbrella + /// header. + llvm::DenseMap<const DirectoryEntry *, Module *> UmbrellaDirs; + friend class ModuleMapParser; public: |