@@ -152,11 +152,22 @@ static TargetInfo *create_target_info(CompilerInstance *Clang,
#endif
+#ifdef CREATEDIAGNOSTICS_TAKES_VFS
+
+static void create_diagnostics(CompilerInstance *Clang)
+{
+ Clang->createDiagnostics(*llvm::vfs::getRealFileSystem());
+}
+
+#else
+
static void create_diagnostics(CompilerInstance *Clang)
{
Clang->createDiagnostics();
}
+#endif
+
static void create_preprocessor(CompilerInstance *Clang)
{
Clang->createPreprocessor(TU_Complete);
#define ISL_CLANG_WRAP_CONFIG_H
#undef CREATE_FROM_ARGS_TAKES_ARRAYREF
+#undef CREATEDIAGNOSTICS_TAKES_VFS
#undef CREATETARGETINFO_TAKES_SHARED_PTR
#undef HAVE_LLVM_OPTION_ARG_H
#undef HAVE_TARGETPARSER_HOST_H
@@ -170,6 +170,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
AC_CHECK_HEADER([llvm/Option/Arg.h],
[AC_DEFINE([HAVE_LLVM_OPTION_ARG_H], [],
[Define if llvm/Option/Arg.h exists])])
+# llvmorg-20-init-12950-gbdd10d9d249b
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#include <clang/Frontend/CompilerInstance.h>]], [[
+ clang::CompilerInstance *Clang;
+ Clang->createDiagnostics(*llvm::vfs::getRealFileSystem());
+]])], [AC_DEFINE([CREATEDIAGNOSTICS_TAKES_VFS], [],
+ [Define if CompilerInstance::createDiagnostics takes VFS])])
+
LDFLAGS="$CLANG_LDFLAGS $LDFLAGS"