1 #include <string> 2 #include <vector> 3 4 #include <clang/Lex/PreprocessorOptions.h> 5 6 /* Convert a clang::PreprocessorOptions to the fourth argument 7 * of CompilerInvocation::setLangDefaults, which may be either 8 * a clang::PreprocessorOptions itself or its Includes. 9 */ 10 struct setLangDefaultsArg4 { setLangDefaultsArg4setLangDefaultsArg411 setLangDefaultsArg4(clang::PreprocessorOptions &PO) : PO(PO) {} 12 operator clang::PreprocessorOptions &() { return PO; } 13 operator std::vector<std::string> &() { return PO.Includes; } 14 15 clang::PreprocessorOptions &PO; 16 }; 17