Clang->createDiagnostics(client);
], [], [AC_DEFINE([CREATEDIAGNOSTICS_TAKES_ARG], [],
[Define if CompilerInstance::createDiagnostics takes argc and argv])])
+ AC_TRY_COMPILE([#include <clang/Lex/HeaderSearchOptions.h>], [
+ using namespace clang;
+ HeaderSearchOptions HSO;
+ HSO.AddPath("", frontend::Angled, false, false);
+ ], [AC_DEFINE([ADDPATH_TAKES_4_ARGUMENTS], [],
+ [Define if HeaderSearchOptions::AddPath takes 4 arguments])])
AC_LANG_POP
CPPFLAGS="$SAVE_CPPFLAGS"
#endif
+#ifdef ADDPATH_TAKES_4_ARGUMENTS
+
+void add_path(HeaderSearchOptions &HSO, string Path)
+{
+ HSO.AddPath(Path, frontend::Angled, false, false);
+}
+
+#else
+
+void add_path(HeaderSearchOptions &HSO, string Path)
+{
+ HSO.AddPath(Path, frontend::Angled, true, false, false);
+}
+
+#endif
+
int main(int argc, char *argv[])
{
llvm::cl::ParseCommandLineOptions(argc, argv);
HSO.ResourceDir = ResourceDir;
for (int i = 0; i < Includes.size(); ++i)
- HSO.AddPath(Includes[i], frontend::Angled, true, false, false);
+ add_path(HSO, Includes[i]);
PO.addMacroDef("__isl_give=__attribute__((annotate(\"isl_give\")))");
PO.addMacroDef("__isl_keep=__attribute__((annotate(\"isl_keep\")))");