diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-17 05:52:41 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-17 05:52:41 +0000 |
commit | 049d3a06ea9f8fc03582488a2b7f24512565a335 (patch) | |
tree | 0969d15cfb854c722a9e87b50ddba573dc7c9d1f /include/clang/Frontend | |
parent | 9298cfc7475c48fa42b168c37f628663d65ddde7 (diff) |
Simplify PreprocessorOptions, it doesn't need abstracted field access.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r-- | include/clang/Frontend/PreprocessorOptions.h | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/include/clang/Frontend/PreprocessorOptions.h b/include/clang/Frontend/PreprocessorOptions.h index 6ae6843ee6..f0c1d3c2c3 100644 --- a/include/clang/Frontend/PreprocessorOptions.h +++ b/include/clang/Frontend/PreprocessorOptions.h @@ -23,6 +23,7 @@ class LangOptions; /// PreprocessorOptions - This class is used for passing the various options /// used in preprocessor initialization to InitializePreprocessor(). class PreprocessorOptions { +public: std::vector<std::pair<std::string, bool/*isUndef*/> > Macros; std::vector<std::string> Includes; std::vector<std::string> MacroIncludes; @@ -43,61 +44,12 @@ class PreprocessorOptions { public: PreprocessorOptions() : UsePredefines(true) {} - bool getUsePredefines() const { return UsePredefines; } - void setUsePredefines(bool Value) { - 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; - } - - const std::string &getTokenCache() const { - return TokenCache; - } - void setTokenCache(llvm::StringRef Value) { - TokenCache = Value; - } - void addMacroDef(llvm::StringRef Name) { Macros.push_back(std::make_pair(Name, false)); } void addMacroUndef(llvm::StringRef Name) { Macros.push_back(std::make_pair(Name, true)); } - void addInclude(llvm::StringRef Name) { - Includes.push_back(Name); - } - void addMacroInclude(llvm::StringRef Name) { - MacroIncludes.push_back(Name); - } - - typedef std::vector<std::pair<std::string, - bool> >::const_iterator macro_iterator; - macro_iterator macro_begin() const { return Macros.begin(); } - macro_iterator macro_end() const { return Macros.end(); } - - typedef std::vector<std::string>::const_iterator include_iterator; - include_iterator include_begin() const { return Includes.begin(); } - include_iterator include_end() const { return Includes.end(); } - - typedef std::vector<std::string>::const_iterator imacro_iterator; - imacro_iterator imacro_begin() const { return MacroIncludes.begin(); } - imacro_iterator imacro_end() const { return MacroIncludes.end(); } }; } // end namespace clang |