diff options
Diffstat (limited to 'include/clang/Driver/Multilib.h')
-rw-r--r-- | include/clang/Driver/Multilib.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/clang/Driver/Multilib.h b/include/clang/Driver/Multilib.h index 6c3738a9cc03..dcf609ab99c6 100644 --- a/include/clang/Driver/Multilib.h +++ b/include/clang/Driver/Multilib.h @@ -7,12 +7,13 @@ // //===----------------------------------------------------------------------===// -#ifndef CLANG_LIB_DRIVER_MULTILIB_H_ -#define CLANG_LIB_DRIVER_MULTILIB_H_ +#ifndef LLVM_CLANG_DRIVER_MULTILIB_H +#define LLVM_CLANG_DRIVER_MULTILIB_H #include "clang/Basic/LLVM.h" #include "llvm/ADT/Triple.h" #include "llvm/Option/Option.h" +#include <functional> #include <string> #include <vector> @@ -97,6 +98,10 @@ public: typedef multilib_list::iterator iterator; typedef multilib_list::const_iterator const_iterator; + typedef std::function<std::vector<std::string>( + StringRef InstallDir, StringRef Triple, const Multilib &M)> + IncludeDirsFunc; + struct FilterCallback { virtual ~FilterCallback() {}; /// \return true iff the filter should remove the Multilib from the set @@ -105,6 +110,7 @@ public: private: multilib_list Multilibs; + IncludeDirsFunc IncludeCallback; public: MultilibSet() {} @@ -150,6 +156,12 @@ public: void print(raw_ostream &OS) const; + MultilibSet &setIncludeDirsCallback(IncludeDirsFunc F) { + IncludeCallback = F; + return *this; + } + IncludeDirsFunc includeDirsCallback() const { return IncludeCallback; } + private: /// Apply the filter to Multilibs and return the subset that remains static multilib_list filterCopy(const FilterCallback &F, |