aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/PreprocessorOptions.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-10 22:09:38 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-10 22:09:38 +0000
commite0a9581d606ea1a6a723758a8d7eef93650cbe93 (patch)
tree2bad8ea39990c17d4725b548177eadbb2d07fdb2 /include/clang/Frontend/PreprocessorOptions.h
parent7976f5923ceddd42167f4bdde4a1c57b5a50b2ae (diff)
Decouple more of clang-cc by moving ImplicitP[CT]H options into
PreprocessorOptions. Global variables used as [in] [out] parameters considered harmful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/PreprocessorOptions.h')
-rw-r--r--include/clang/Frontend/PreprocessorOptions.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/clang/Frontend/PreprocessorOptions.h b/include/clang/Frontend/PreprocessorOptions.h
index cae37e78f5..d2af829c6d 100644
--- a/include/clang/Frontend/PreprocessorOptions.h
+++ b/include/clang/Frontend/PreprocessorOptions.h
@@ -28,6 +28,13 @@ class PreprocessorOptions {
unsigned UsePredefines : 1; /// Initialize the preprocessor with the compiler
/// and target specific predefines.
+ /// The implicit PCH included at the start of the translation unit, or empty.
+ std::string ImplicitPCHInclude;
+
+ /// The implicit PTH input included at the start of the translation unit, or
+ /// empty.
+ std::string ImplicitPTHInclude;
+
public:
PreprocessorOptions() : UsePredefines(true) {}
@@ -36,6 +43,24 @@ public:
UsePredefines = Value;
}
+ const std::string &getImplicitPCHInclude() const {
+ return ImplicitPCHInclude;
+ }
+ void setImplicitPCHInclude(llvm::StringRef Value) {
+ assert((Value.empty() || ImplicitPTHInclude.empty()) &&
+ "Cannot both implicit PCH and PTH includes!");
+ ImplicitPCHInclude = Value;
+ }
+
+ const std::string &getImplicitPTHInclude() const {
+ return ImplicitPTHInclude;
+ }
+ void setImplicitPTHInclude(llvm::StringRef Value) {
+ assert((ImplicitPCHInclude.empty() || Value.empty()) &&
+ "Cannot both implicit PCH and PTH includes!");
+ ImplicitPTHInclude = Value;
+ }
+
void addMacroDef(const std::string &Name) {
Macros.push_back(std::make_pair(Name, false));
}