aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/PreprocessorOptions.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-13 20:44:41 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-13 20:44:41 +0000
commit1c7e0472f5683a8ade62285f366637050cf113e5 (patch)
tree5cce234698b9cc8c665aebdc1a29bea9843b652a /include/clang/Frontend/PreprocessorOptions.h
parent221d5a5005b3dbde50b8b0a40bb5c5e6da8c1173 (diff)
When building a module on-demand, clear out the "non-modular" language
and preprocessor options (such as macro definitions) first. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/PreprocessorOptions.h')
-rw-r--r--include/clang/Frontend/PreprocessorOptions.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Frontend/PreprocessorOptions.h b/include/clang/Frontend/PreprocessorOptions.h
index 040b845199..3df6512600 100644
--- a/include/clang/Frontend/PreprocessorOptions.h
+++ b/include/clang/Frontend/PreprocessorOptions.h
@@ -190,6 +190,16 @@ public:
RemappedFiles.clear();
RemappedFileBuffers.clear();
}
+
+ /// \brief Reset any options that are not considered when building a
+ /// module.
+ void resetNonModularOptions() {
+ Macros.clear();
+ MacroIncludes.clear();
+ DumpDeserializedPCHDecls = false;
+ TokenCache.clear();
+ RetainRemappedFileBuffers = true;
+ }
};
} // end namespace clang