diff options
Diffstat (limited to 'include/clang/Frontend/PreprocessorOptions.h')
-rw-r--r-- | include/clang/Frontend/PreprocessorOptions.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/clang/Frontend/PreprocessorOptions.h b/include/clang/Frontend/PreprocessorOptions.h index f0c1d3c2c3..c43a1feb8c 100644 --- a/include/clang/Frontend/PreprocessorOptions.h +++ b/include/clang/Frontend/PreprocessorOptions.h @@ -13,6 +13,7 @@ #include "llvm/ADT/StringRef.h" #include <cassert> #include <string> +#include <utility> #include <vector> namespace clang { @@ -41,6 +42,21 @@ public: /// If given, a PTH cache file to use for speeding up header parsing. std::string TokenCache; + /// \brief The set of file remappings, which take existing files on + /// the system (the first part of each pair) and gives them the + /// contents of other files on the system (the second part of each + /// pair). + std::vector<std::pair<std::string, std::string> > RemappedFiles; + + typedef std::vector<std::pair<std::string, std::string> >::const_iterator + remapped_file_iterator; + remapped_file_iterator remapped_file_begin() const { + return RemappedFiles.begin(); + } + remapped_file_iterator remapped_file_end() const { + return RemappedFiles.end(); + } + public: PreprocessorOptions() : UsePredefines(true) {} @@ -50,6 +66,9 @@ public: void addMacroUndef(llvm::StringRef Name) { Macros.push_back(std::make_pair(Name, true)); } + void addRemappedFile(llvm::StringRef From, llvm::StringRef To) { + RemappedFiles.push_back(std::make_pair(From, To)); + } }; } // end namespace clang |