diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-02-07 00:21:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-02-07 00:21:12 +0000 |
commit | 2a06085281d1b6aee628f85e8676eec04542cbc9 (patch) | |
tree | 555fd6e3a34befb20718444336bf6667927a6261 /include/clang/Lex/HeaderSearchOptions.h | |
parent | 712f5b3bef988e8d3dd38fdf2264e7cc1a3f6bf9 (diff) |
Introduce -fmodules-ignore-macro=NNN to ignore a macro when building/loading modules.
The use of this flag enables a modules optimization where a given set
of macros can be labeled as "ignored" by the modules
system. Definitions of those macros will be completely ignored when
building the module hash and will be stripped when actually building
modules. The overall effect is that this flag can be used to
drastically reduce the number of
Eventually, we'll want modules to tell us what set of macros they
respond to (the "configuration macros"), and anything not in that set
will be excluded. However, that requires a lot of per-module
information that must be accurate, whereas this option can be used
more readily.
Fixes the rest of <rdar://problem/13165109>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/HeaderSearchOptions.h')
-rw-r--r-- | include/clang/Lex/HeaderSearchOptions.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/clang/Lex/HeaderSearchOptions.h b/include/clang/Lex/HeaderSearchOptions.h index 8fecd65726..c45884360d 100644 --- a/include/clang/Lex/HeaderSearchOptions.h +++ b/include/clang/Lex/HeaderSearchOptions.h @@ -12,7 +12,9 @@ #include "clang/Basic/LLVM.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" +#include "llvm/ADT/SetVector.h" #include "llvm/ADT/StringRef.h" +#include <string> #include <vector> namespace clang { @@ -86,13 +88,17 @@ public: /// \brief The directory used for the module cache. std::string ModuleCachePath; - + /// \brief Whether we should disable the use of the hash string within the /// module cache. /// /// Note: Only used for testing! unsigned DisableModuleHash : 1; - + + /// \brief The set of macro names that should be ignored for the purposes + /// of computing the module hash. + llvm::SetVector<std::string> ModulesIgnoreMacros; + /// Include the compiler builtin includes. unsigned UseBuiltinIncludes : 1; |